Moving object detection photointerrupter having a determination of passing of the moving object based on its passing direction and the detection information of the next moving object and electric device using the same

ABSTRACT

An embodiment of the present invention comprises: at least one light-emitting portion that emits light; a plurality of light-receiving portions, disposed at intervals in the passing direction of the moving object, that receive and detect light emitted from the light-emitting portion and reflected by the moving object; a holding portion that holds information indicating the passing direction of the moving object corresponding to a change in the detection outputs of the light-receiving portions occurring when the light-receiving portions receive the light reflected by the moving object; and a determination portion that determines the passing of the moving object based on the passing direction of the moving object as held by the holding portion and the detection outputs of the light-receiving portions occurring when the light-receiving portions receive the light reflected by the next moving object.

BACKGROUND OF THE INVENTION

This application claims priority under 35 U.S.C. § 119(a) on JapanesePatent Application No. 2006-274217, filed Oct. 5, 2006, and on JapanesePatent Application No. 2006-334839, filed Dec. 12, 2006, the contents ofwhich are incorporated herein by reference in their entirety.

The present invention relates to a moving object detectionphotointerrupter for detecting a moving object, and to an electricdevice using the same.

Reflective types and transmissive types exist as conventionalphotointerrupter devices. With the former, or the reflective type, lightfrom a light-emitting element is outputted into the path through which amoving object travels, the light reflected by the moving object isreceived by a light-receiving element, and the moving object is detectedbased on a change in the detection output of the light-receiving elementat the time of receiving the reflected light. With the latter, or thetransmissive type, light outputted from a light-emitting element isreceived by a light-receiving element via the path of a moving object,and the moving object is detected based on a change in the detectionoutput of the light-receiving element at the time of the light beinginterrupted by the moving object (refer to JP 2006-71621A andJP2006-136410).

In addition, JP 2006-71621A and JP 2006-136410A disclose a transmissivetype device that detects unidirectional movement of a moving object, amedal, or the like. In these devices, plural light receivers aredisposed in proximity to one another in the path of the moving object,the medal, or the like. Movement of the moving object, the medal, or thelike is detected, and the number of the moving object, the medal, or thelike is counted, based on a change in the detection output of each lightreceiver when the incoming light is interrupted by the moving object,the medal, or the like. Additionally, movement of the moving object, themedal, or the like in the reverse direction is detected as an error.

Furthermore, JP 2001-318164A discloses a transmissive type device thatdetects movement of an orb. Here, light from light-emitting elementspasses into light-receiving elements via the path of the orb. Movementof the orb is detected, and the number of orbs is counted, based on achange in the detection output of each light-receiving element when theincoming light is interrupted by the orb. When only the incoming lightof light-receiving elements located downstream in the movement directionis interrupted, the orb is judged to have rebounded, which preventserroneous detection.

However, with the technology disclosed in JP 2006-71621A and JP2006-136410A, although movement of the moving object, the medal, or thelike in the reverse direction is detected as an error, there arenevertheless mistakes in counting the number of the moving object, themedal, or the like in such cases. For example, when a moving object, amedal, or the like moves and passes in the forward direction, reboundsand passes in the reverse direction, and then once again passes in theforward direction, the same moving object, medal, or the like is countedtwice, and thus errors arise in the count value.

Also, with the technology disclosed in JP 2001-318164A, when only theincoming light of light-receiving elements located downstream in themovement direction is interrupted, the orb is judged to have rebounded,and erroneous detection is prevented thereby; however, when the orb onceagain passes in front of the light-receiving elements in the forwarddirection after having moved in front of the light-receiving elements inthe reverse direction, the same orb is counted twice, and thus errorsarise in the count value.

SUMMARY OF THE INVENTION

Accordingly, the present invention has been conceived in light of theabovementioned conventional problems, and it is an object thereof toprovide a moving object detection photointerrupter and an electricdevice using the same capable of accurately determining the passage of amoving object, accurately counting moving objects, and appropriatelydetermining the occurrence of errors, even when an abnormal operationsuch as a rebound occurs and regardless of the distance of the reboundoccurring at this time.

To solve the abovementioned problems, a moving object detectionphotointerrupter according to the present invention sequentially detectsthe passing of a plurality of moving objects, and comprises: at leastone light-emitting portion that emits light; a plurality oflight-receiving portions, disposed at intervals in the passing directionof the moving object, that receive and detect light emitted from thelight-emitting portion and reflected by the moving object; a holdingportion that holds information indicating the passing direction of themoving object corresponding to a change in the detection outputs of thelight-receiving portions occurring when the light-receiving portionsreceive the light reflected by the moving object; and a determinationportion that determines the passing of the moving object based on thepassing direction of the moving object as held by the holding portionand the detection outputs of the light-receiving portions occurring whenthe light-receiving portions receive the light reflected by the nextmoving object.

In addition, a moving object detection photointerrupter according to thepresent invention sequentially detects the passing of a plurality ofmoving objects, and comprises: at least one light-emitting portion thatemits light; a plurality of light-receiving portions, disposed atintervals in the passing direction of the moving object, that receiveand detect light emitted from the light-emitting portion via the path ofpassing of the moving object; a holding portion that holds informationindicating the passing direction of the moving object corresponding to achange in the detection outputs of the light-receiving portionsoccurring when the moving object passes through the path of passing; anda determination portion that determines the passing of the moving objectbased on the passing direction of the moving object as held by theholding portion and the detection outputs of the light-receivingportions occurring when the moving object passes through the path ofpassing.

For example, when the passing direction of the moving object as held bythe holding portion is the forward direction, and the passing directionof the next moving object corresponding to the detection outputs of thelight-receiving portions is the forward direction, the determinationportion determines that the next moving object has passed.

In addition, when the passing direction of the moving object as held bythe holding portion is the reverse direction, the determination portiondetermines that the moving object has not passed.

Alternatively, when the passing direction of the moving object as heldby the holding portion is the reverse direction, the determinationportion determines that the next moving object has not passed, even ifthe passing direction of the next moving object corresponding to achange in the detection outputs of the light-receiving portions is theforward direction.

Furthermore, when the moving object has been detected by thelight-receiving portion on the exit side of the forward direction andhas not been detected by a light-receiving portion on the entry side,the determination portion determines that the moving object has notpassed, and outputs an error signal or holds the signal indicating thedetermination.

In addition, when the moving object has been detected by thelight-receiving portion on the entry side of the forward direction andhas not been detected by the light-receiving portion on the exit side,the holding portion holds the forward direction as the passing directionof the moving object, and when the passing direction of the movingobject as held by the holding portion is the forward direction, and thepassing direction of the next moving object corresponding to a change inthe detection outputs of the light-receiving portions is the forwarddirection, the determination portion determines that the next movingobject has passed.

Furthermore, when the outputs of the light reception performed by thelight-receiving portions change simultaneously, the determinationportion outputs an error signal or holds the signal indicating thedetermination.

In addition, after outputting an error signal or holding the signalindicating the determination, the determination portion stops the outputof the error signal when the passing direction of the moving objectcorresponding to a change in the detection outputs of thelight-receiving portions becomes the forward direction.

Furthermore, the moving object detection photointerrupter furthercomprises a synchronization detection portion that validates thedetection outputs of the light-receiving portions when the lightemission timing of the light-emitting portion and the light receivingtiming of the light-receiving portions match plural times in a row.

In addition, the synchronization detection portion invalidates thedetection outputs of the light-receiving portions when the lightemission timing of the light-emitting portion and the light receivingtiming of the light-receiving portions do not match.

Further still, there is only one light-emitting portion, and thelight-receiving portions receive the light from the light-emittingportion together.

The electric device according to the present invention uses theaforementioned moving object detection photointerrupter according to thepresent invention.

The moving object detection photointerrupter according to the presentinvention is a reflective type, in which the light-emitting portionemits light, and the light reflected by the moving object is receivedand detected by the light-receiving portions, or is a transmissive type,in which the light from the light-emitting portion is received anddetected by the light-receiving portions via the path of passing of themoving object. In both of these, the light-receiving portions aredisposed at intervals in the passing direction of the moving object, andthus it is possible to detect the passing direction of the moving objectbased on a change in the detection outputs of the light-receivingportions. In addition, the passing direction of the moving objectcorresponding to a change in the detection output of the light-receivingportions occurring when the moving object passes is held, and thepassing of the moving object is determined based on the passingdirection of the present moving object and the detection output of thelight-receiving portions when the light-receiving portions receive thelight reflected by the next moving object. In other words, the passingof the moving object is determined not only by referring to thedetection outputs of the light-receiving portions but also by holdingand referring to the passing direction of the previous moving object.Through this, the passage of a moving object can be accuratelydetermined, moving objects can be accurately counted, and the occurrenceof errors can be appropriately determined, even when an abnormaloperation such as a rebound occurs and regardless of the distance of therebound occurring at this time.

For example, when the passing direction of the previous moving object isthe forward direction, and the passing direction of the next movingobject is the forward direction, the next moving object is determined tohave passed.

In addition, when the passing direction of the moving object is thereverse direction, the moving object is assumed to have rebounded in thereverse direction after passing through, and it is thus determined thatthe moving object has not passed.

Alternatively, when the passing direction of a moving object is thereverse direction and the passing direction of the next moving object isthe forward direction, the moving object is assumed to have once againpassed through in the forward direction after rebounding in the reversedirection, and it is thus determined that the moving object has notpassed.

Furthermore, when the moving object has been detected by thelight-receiving portion on the exit side of the forward direction andhas not been detected by the light-receiving portion on the entry side,it is determined that the moving object has not passed, and an errorsignal is outputted or the signal indicating the determination is held,providing notification of an error.

In addition, when the moving object has been detected by thelight-receiving portion on the entry side of the forward direction andhas not been detected by the light-receiving portion on the exit side,the forward direction is held as the passing direction of the movingobject, and when the passing direction of the next moving object is theforward direction, the next moving object is determined to have passed.

Furthermore, when the light-receiving outputs of the light-receivingportions change simultaneously, an error is determined to have occurred,and after this, when the passing direction of the moving objectcorresponding to change in the detection outputs of the light-receivingportions becomes the forward direction, the error is determined to havebeen solved. Because the light-receiving portions are disposed atintervals in the passing direction of the moving object, the detectionoutputs of the light-receiving portions change sequentially along withthe movement of the moving object. Therefore, when the light-receivingoutputs of the light-receiving portions change simultaneously, it can beassumed that an error has occurred. For example, there are situationswhere the light-receiving outputs of the light-receiving portions changesimultaneously due to the entering of ambient light. When the passingdirection of the moving object corresponding to the detection outputs ofthe light-receiving portions becomes the forward direction, thedetection outputs of the light-receiving portions have returned tonormal, and thus it can be assumed that the error has been solved.

Furthermore, the detection outputs of the light-receiving portions arevalidated when the light emission timing of the light-emitting portionand the light receiving timing of the light-receiving portions matchplural times in a row. Also, the detection outputs of thelight-receiving portions are invalidated when the light emission timingof the light-emitting portion and the light receiving timing of thelight-receiving portions do not match. Through this, it is possible toinvalidate detection outputs of the light-receiving portions due to theentering of ambient light, and validate only detection outputs of thelight-receiving portions due to the entering of light from thelight-emitting portion; thus it is possible to more accurately determinethe passing direction of the moving object and the passing of the movingobject.

In addition, there is only one light-emitting portion, and thelight-receiving portions receive the light from the light-emittingportion together. While the same number of light-emitting portions aslight-receiving portions may be provided, including just a singlelight-emitting portion makes it possible to reduce the number ofcomponents and simplify the configuration.

An electric device according to the present invention uses theaforementioned moving object detection photointerrupter according to thepresent invention, and thus has the same operations and effects as theaforementioned moving object detection photointerrupter according to thepresent invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a side view illustrating an embodiment of a moving objectdetection photointerrupter according to the present invention.

FIG. 2 is a cross-section of the moving object detectionphotointerrupter of FIG. 1.

FIG. 3 is a plan view illustrating the moving object detectionphotointerrupter of FIG. 1.

FIG. 4 is a plan view illustrating a light-receiving chip included inthe moving object detection photointerrupter of FIG. 1.

FIG. 5 is a graph illustrating change in the detection output of eachlight-receiving element when a moving object moves in front of themoving object detection photointerrupter of FIG. 1.

FIG. 6 is a block diagram illustrating a configuration of the movingobject detection photointerrupter of FIG. 1.

FIG. 7 is a diagram illustrating a course of movement of a moving objectrelative to first and second light-receiving elements of the movingobject detection photointerrupter of FIG. 1.

FIG. 8 is a timing chart illustrating operations of a moving objectdetection photointerrupter when a moving object passes in front of firstand second light-receiving elements in the forward direction.

FIG. 9 is a timing chart illustrating operations of a moving objectdetection photointerrupter when a moving object passes in front of firstand second light-receiving elements in the forward direction, thenrebounds and returns, and passes in front of the first and secondlight-receiving elements in the reverse direction.

FIG. 10 is a timing chart illustrating operations of a moving objectdetection photointerrupter when a moving object moves to in front offirst and second light-receiving elements in the forward direction,rebounds and returns, and then continues on and once again passesthrough in the forward direction.

FIG. 11 is a timing chart illustrating operations of a moving objectdetection photointerrupter when a moving object moves to in front of afirst light-receiving element in the forward direction, rebounds andreturns, and then continues on and once again passes through in theforward direction.

FIG. 12 is a timing chart illustrating operations of a moving objectdetection photointerrupter when a moving object passes in front of firstand second light-receiving elements in the forward direction, reboundsand returns to in front of the second light-receiving element, and thencontinues on and once again passes through in the forward direction.

FIG. 13 is a timing chart illustrating operations of a moving objectdetection photointerrupter when ambient light or light resulting fromfraudulent behavior enters the first and second light-receiving elementssimultaneously.

FIG. 14 is a circuit diagram illustrating a detailed configuration of anoutput holding circuit, and output determination circuit, and an outputcircuit in the moving object detection photointerrupter of FIG. 6.

DESCRIPTION OF THE PREFERRED EMBODIMENT

Hereinafter, an embodiment of the present invention shall be describedin detail with reference to the appended drawings.

FIGS. 1, 2, and 3 are a side view, cross-section, and plane view,respectively, illustrating an embodiment of the moving object detectionphotointerrupter of the present invention. In the moving objectdetection photointerrupter 1 of the present embodiment, a light-emittingelement 3 and a light-receiving chip 4 are provided on a lead frame 2,and the light-emitting element 3 and light-receiving chip 4 are wiredand connected to the lead frame 2 and the like through respective wires5. Translucent resins 6 and 7 are formed through molding and thelight-emitting element 3 and light-receiving chip 4 are sealed withinthe translucent resins 6 and 7 respectively. Furthermore, alight-blocking resin case 8 is formed through molding and thetranslucent resins 6 and 7 are sealed within the light-blocking resincase 8. The lead frame 2, light-emitting element 3, light-receiving chip4, and so on are integrated into a single body through thelight-blocking resin case 8. Furthermore, a connector 9 is fixed to aside wall 8 a on one side of the light-blocking resin case 8, and thelight-blocking resin case 8 is covered with a translucent resin cover10, which is fixed thereto.

The light-blocking resin case 8 surrounds the light-emitting element 3and light-receiving chip 4 by the side walls 8 a on the four sides, andthe light-emitting element 3 and light-receiving chip 4 are blocked offfrom one another by a partition wall 8 b. The light-emitting element 3and light-receiving chip 4 are disposed within respective compartments 8c and 8 d of the light-blocking resin case 8; thus light emitted fromthe light-emitting element 3 does not directly enter first and secondlight-receiving elements 4 a and 4 b of the light-receiving chip 4, andit is also difficult for ambient light to enter the first and secondlight-receiving elements 4 a and 4 b of the light-receiving chip 4.

The end portions of the translucent resins 6 and 7 form collimate lenses6 a and 7 a, respectively. Light emitted from the light-emitting element3 is emitted in the direction of the arrow B, passing through thecollimate lens 6 a of the translucent resin 6 and the translucent resincover 10.

The first and second light-receiving elements 4 a and 4 b are providedin the light-receiving chip 4. When a moving object 11 moves in front ofthe moving object detection photointerrupter 1, the light emitted fromthe light-emitting element 3 is reflected by the moving object 11 in thedirection of the arrow C. This reflected light passes through thetranslucent resin cover 10 and the collimate lens 7 a of the translucentresin 7 and enters into at least one of the first and secondlight-receiving elements 4 a and 4 b of the light-receiving chip 4. Whenthe moving object 11 is not present in front of the moving objectdetection photointerrupter 1, the light emitted from the light-emittingelement 3 is not reflected by the moving object 11 and thus does notenter into the light-receiving chip 4.

The collimate lens 6 a converges and emits the light from thelight-emitting element 3, whereas the collimate lens 7 a converges thelight reflected by the moving object 11 and causes the light to enterthe light-receiving chip 4. When the light from the light-emittingelement 3 is converged by the collimate lens 6 a, the range of the lightemitted from the light-emitting element 3 narrows, and a light figureappears, small and bright, on the moving object 11. Furthermore, whenthe light reflected by the moving object 11 is converged by thecollimate lens 7 a, the light figure on the moving object 11 appears,small and bright, on the light-receiving chip 4 or in the vicinitythereof. For this reason, the first and second light-receiving elements4 a and 4 b of the light-receiving chip 4 undergo distinct changes intheir detection outputs when the light emitted from the light-emittingelement 3 and reflected by the moving object 11 enters thelight-receiving elements 4 a and 4 b and when this light does not enterthe light-receiving elements 4 a and 4 b. Accordingly, this light can bedetected with certainty.

The optical properties of the collimate lenses 6 a and 7 a are set inaccordance with the dimensions of the light-receiving areas of the firstand second light-receiving elements 4 a and 4 b of the light-receivingchip 4, and are configured so that a sufficient amount of the lightreflected by the moving object 11 enters the light-receiving areas ofthe first and second light-receiving elements 4 a and 4 b of thelight-receiving chip 4 with certainty.

In addition, the dimensions of the light-receiving areas of the firstand second light-receiving elements 4 a and 4 b are identical, and thusthe first and second light-receiving elements 4 a and 4 b output thesame level of detection output when receiving the same amounts of light.

Here, the first and second light-receiving elements 4 a and 4 b of thelight-receiving chip 4 are parallel to one another on thelight-receiving chip 4, as shown in FIG. 4, and are disposed along aforward direction D of the moving object 11, as shown in FIG. 3.

As shown in FIGS. 2 and 3, when the moving object 11 moves in theforward direction D, the moving object 11 first reaches the front of thefirst light-receiving element 4 a of the light-receiving chip 4, andsubsequently reaches the front of the second light-receiving element 4 bof the light-receiving chip 4. Accordingly, the light emitted from thelight-emitting element 3 is first reflected by the moving object 11 thathas reached the front of the first light-receiving element 4 a andenters into the first light-receiving element 4 a; after this, the lightis reflected by the moving object 11 that has reached the front of thesecond light-receiving element 4 b and enters into the secondlight-receiving element 4 b.

Furthermore, the moving object 11 moves past the front of the firstlight-receiving element 4 a of the light-receiving chip 4, andsubsequently moves past the front of the second light-receiving element4 b of the light-receiving chip 4. Accordingly, first, the lightreflected by the moving object 11 and entering into the firstlight-receiving element 4 a disappears, and next, the light reflected bythe moving object 11 and entering into the second light-receivingelement 4 b disappears.

FIG. 5 is a graph illustrating change in the detection output of thefirst and second light-receiving elements 4 a and 4 b of thelight-receiving chip 4 when the moving object 11 passes in front of themoving object detection photointerrupter 1 while moving in the forwarddirection D. Referring to the graph in FIG. 5, when the moving object 11has approached the front of the moving object detection photointerrupter1, first, the detection output of the first light-receiving element 4 arises due to the light reflected by the moving object 11 entering intothe first light-receiving element 4 a, and then, the detection output ofthe second light-receiving element 4 b rises due to the light reflectedby the moving object 11 entering into the second light-receiving element4 b.

Then, as the moving object 11 passes by and moves away from the front ofthe moving object detection photointerrupter 1, first, the detectionoutput of the first light-receiving element 4 a drops due to the lightreflected by the moving object 11 ceasing to enter into the firstlight-receiving element 4 a, and then, the detection output of thesecond light-receiving element 4 b drops due to the light reflected bythe moving object 11 ceasing to enter into the second light-receivingelement 4 b.

It should be noted that in the case where the moving object 11 moves inthe direction opposite the forward direction D, the moving object 11first passes in front of the second light-receiving element 4 b of thelight-receiving chip 4, and then passes in front of the firstlight-receiving element 4 a of the light-receiving chip 4. Thus, thedetection output of first light-receiving element 4 a rises after thedetection output of the second light-receiving element 4 b rises, andfurthermore, the detection output of first light-receiving element 4 adrops after the detection output of the second light-receiving element 4b drops.

Therefore, it is possible to detect movement and the passing directionof the moving object 11 by monitoring changes in the detection output ofthe first and second light-receiving elements 4 a and 4 b of thelight-receiving chip 4.

Furthermore, as described earlier, the collimate lenses 6 a and 7 a havean effect of causing the detection outputs of the first and secondlight-receiving elements 4 a and 4 b of the light-receiving chip 4 toundergo distinct changes when the light emitted from the light-emittingelement 3 and reflected by the moving object 11 enters thelight-receiving elements 4 a and 4 b and when this light does not enterthe light-receiving elements 4 a and 4 b. Through this, the accuracy ofthe detection of the movement and passing direction of the moving object11 based on changes in the detection output of the first and secondlight-receiving elements 4 a and 4 b is improved, and detection is madeeasy.

Furthermore, the optical properties of the collimate lenses 6 a and 7 aare set in accordance with the dimensions of the light-receiving areasof the first and second light-receiving elements 4 a and 4 b of thelight-receiving chip 4, and the light-receiving areas of the first andsecond light-receiving elements 4 a and 4 b have the same dimensions;through this, the accuracy of the detection of the movement and passingdirection of the moving object 11 is improved, and detection is madeeasy.

FIG. 6 is a block diagram illustrating a configuration of the movingobject detection photointerrupter 1 according to the present embodiment.The moving object detection photointerrupter 1 of the present embodimentcomprises the light-emitting element 3, the first and secondlight-receiving elements 4 a and 4 b of the light-receiving chip 4, acomputation control portion 30 that drives and controls thelight-emitting element 3 and computes the detection output of the firstand second light-receiving elements 4 a and 4 b, and a connector 9connected to an external circuit. The computation control portion 30 isan IC chip. The light-emitting element 3, the light-receiving chip 4,and the like may be selectively included and integrated into this ICchip.

The computation control portion 30 includes: an amplification circuit 31that amplifies a detection signal from the first light-receiving element4 a; a capacitor 32 for blocking the DC element; a first comparator 33;a first synchronizing detection circuit 34; an amplification circuit 35that amplifies a detection signal from the second light-receivingelement 4 b; a capacitor 36 for blocking the DC element (mainly, a noiseelement); a second comparator 37; a second synchronizing detectioncircuit 38; an output holding circuit 39 that outputs a holding signal Jcorresponding to changes in the signals outputted from the first andsecond synchronizing detection circuits 34 and 38; an outputdetermination circuit 41 that processes signals SA and SB outputted fromthe first and second synchronizing detection circuits 34 and 38 and theholding signal J from the output holding circuit 39; an output circuit44 that outputs an output signal Vo based on signals K and L from theoutput determination circuit 41; a light-emitting element drivingcircuit 42 that drives and controls the light-emitting element 3; and anoscillator 43.

The computation control portion 30 is supplied with a source voltage Vccthrough the connector 9, and operates thereby.

The light-emitting element 3 is applied with the source voltage Vcc onits anode side through the connector 9, while its cathode side isconnected to the light-emitting element driving circuit 42. Thelight-emitting element driving circuit 42 is inputted with anoscillation signal from the oscillator 43, and switches the path betweenthe cathode side of the light-emitting element 3 and the ground insynchronization with the oscillation signal, whereupon a pulse-formsignal SP is applied to the light-emitting element 3, causing thelight-emitting element 3 to emit light in synchronization with theoscillation signal, and thus light pulses are emitted from thelight-emitting element 3.

As mentioned earlier, when the moving object 11 moves in front of thefirst and second light-receiving elements 4 a and 4 b, the light fromthe light-emitting element 3 is reflected by the moving object 11 andenters into the first and second light-receiving elements 4 a and 4 b.The detection outputs of the first and second light-receiving elements 4a and 4 b changes as the light reflected by the moving object 11 isreceived, as shown in FIG. 5; the DC elements of these are blocked bythe capacitors 32 and 36, and the resultant are inputted into the firstand second comparators 33 and 37 respectively.

The first comparator 33 compares the detection output of the firstlight-receiving element 4 a with a prescribed threshold value, andgenerates and outputs a binary signal PDA that is high-level when thedetection output is greater than or equal to the threshold value and islow-level when the detection output is less than the threshold value. Inthe same manner, the second comparator 37 compares the detection outputof the second light-receiving element 4 b with a threshold value, andgenerates and outputs a binary signal PDB.

The first synchronizing detection circuit 34 is inputted with theoscillation signal from the oscillator 43 and samples the binary signalfrom the first comparator 33 in synchronization with the oscillationsignal; when the binary signal is high-level at least two times in a rowin synchronization with the oscillation signal, the first synchronizingdetection circuit 34 switches and holds the output signal SA fromlow-level to high-level, and when the binary signal is low-level atleast two times in a row in synchronization with the oscillation signal,the first synchronizing detection circuit 34 switches and holds theoutput signal SA from high-level to low-level. In the same manner, thesecond synchronizing detection circuit 38 samples the binary signal fromthe second comparator 37 in synchronization with the oscillation signalfrom the oscillator 43; when the binary signal is high-level at leasttwo times in a row in synchronization with the oscillation signal, thesecond synchronizing detection circuit 38 switches and holds the outputsignal SB from low-level to high-level, and when the binary signal islow-level at least two times in a row in synchronization with theoscillation signal, the second synchronizing detection circuit 38switches and holds the output signal SB from high-level to low-level.

Therefore, the detection output of the first light-receiving element 4 ais binarized by the first comparator 33, and then sampled by the firstsynchronizing detection circuit 34 at the timing at which light isemitted by the light-emitting element 3. The output signal SA of thefirst synchronizing detection circuit 34 is set to and held at thehigh-level when the detection output of the first light-receivingelement 4 a is high-level at least two times in a row at the timing atwhich light is emitted from the light-emitting element 3. In the samemanner, the detection output of the second light-receiving element 4 bis also binarized by the second comparator 37, and then sampled by thesecond synchronizing detection circuit 38 at the timing at which lightis emitted by the light-emitting element 3. The output signal SB of thesecond synchronizing detection circuit 38 is set to and held at thehigh-level when the detection output of the second light-receivingelement 4 b is high-level at least two times in a row at the timing atwhich light is emitted from the light-emitting element 3.

The output signal SA of the first synchronizing detection circuit 34 isreturned to low-level when the detection output of the firstlight-receiving element 4 a is low-level at least two times in a row atthe timing at which light is emitted from the light-emitting element 3;in the same manner, the output signal SB of the second synchronizingdetection circuit 38 is returned to low-level when the detection outputof the second light-receiving element 4 b is low-level at least twotimes in a row at the timing at which light is emitted from thelight-emitting element 3.

The output holding circuit 39 sets the holding signal J to high-level orlow-level in accordance with change in the output signals SA and SB ofthe first and second synchronizing detection circuits 34 and 38respectively. To be more specific, it is possible to assume that themoving object 11 once previous to the present moving object passed inthe forward direction based on change in the output signals SA and SB ofthe first and second synchronizing detection circuits 34 and 38; next,when the present moving object 11 has been assumed to have passed in theforward direction, the holding signal J is set to high-level, whereas inother cases, the holding signal J is set to low-level.

The output determination circuit 41 is inputted with the output signalsSA and SB of the first and second synchronizing detection circuits 34and 38 respectively, and is also inputted with the holding signal J ofthe output holding circuit 39. Based on the signals SA, SB, and J, theoutput determination circuit 41 determines whether or not a movingobject 11 has passed, outputs an output signal K to the output circuit44 as a low-level pulse when the moving object 11 begins to pass in theforward direction, and outputs an output signal L to the output circuit44 as a low-level pulse when the moving object 11 has finished passingin the forward direction.

The output circuit 44 is inputted with the output signals K and L fromthe output determination circuit 41, and switches the level of an outputsignal Vo based on these signals.

Determining that the moving object 11 has passed in the forwarddirection as performed by the output determination circuit 41 isperformed accurately even if an abnormal operation, such as reboundingof the moving object 11, occurs, regardless of the distance of therebound. Therefore, the moving object 11 can be accurately counted bycounting the number of times the output signal Vo from the outputcircuit 44 is high-level.

Next, an operation for detecting the moving object 11 performed by themoving object detection photointerrupter 1 shall be described withreference to FIGS. 7 to 13.

FIG. 7 is a diagram illustrating a course of movement of a moving object11 relative to the first and second light-receiving elements 4 a and 4 bof the moving object detection photointerrupter 1. Here, a passageposition Q1 of immediately before the first and second light-receivingelements 4 a and 4 b, a passage position Q2 that crosses only in frontof the first light-receiving element 4 a, a passage position Q3 thatcrosses in front of both the first and second light-receiving elements 4a and 4 b, a passage position Q4 that crosses only in front of thesecond light-receiving element 4 b, and a passage position Q5 ofimmediately after the first and second light-receiving elements 4 a and4 b illustrate the passage of the moving object 11 in the forwarddirection D.

FIG. 8 is a timing chart illustrating operations of the moving objectdetection photointerrupter 1 when a moving object 11 passes in front ofthe first and second light-receiving elements 4 a and 4 b in the forwarddirection D. FIG. 8 shows the following: the pulse-form signal SPindicating the timing at which light is emitted by the light-emittingelement 3; the presence/absence of the moving object 11 in front of thefirst and second light-receiving elements 4 a and 4 b; the binarysignals PDA and PDB of the first and second comparators 33 and 37respectively; the output signals SA and SB of the first and secondsynchronizing detection circuits 34 and 38 respectively; the holdingsignal J of the output holding circuit 39; the output signals K and L ofthe output determination circuit 41; and the output signal Vo of theoutput circuit 44.

In FIG. 8, the period from time t0 to time t1 is a period in which themoving object 11 is in the passage position Q1 shown in FIG. 7, or inother words, is immediately before the first and second light-receivingelements 4 a and 4 b. Because the moving object 11 is immediately beforethe first and second light-receiving elements 4 a and 4 b, the pulselight from the light-emitting element 3 is not reflected by the movingobject 11 and does not enter into the first and second light-receivingelements 4 a and 4 b; the binary signals PDA and PDB of the first andsecond comparators 33 and 37 are low-level, and the output signals SAand SB of the first and second synchronizing detection circuits 34 and38 are low-level as well. In addition, because this is the first movingobject 11, the holding signal J of the output holding circuit 39 is setto low-level. At this time, the output determination circuit 41 holdsthe output signals K and L at high-level, in accordance with the outputsignals SA and SB of the first and second synchronizing detectioncircuits 34 and 38 respectively being low-level. Because the outputsignals K and L are high-level, the output circuit 44 holds the outputsignal Vo at low-level.

In FIG. 8, the period from time t1 to time t2 is a period in which themoving object 11 is in the passage position Q2, or in other words, is infront of the first light-receiving element 4 a. Because the movingobject 11 is in front of only the first light-receiving element 4 a, thepulse light from the light-emitting element 3 is reflected by the movingobject 11 and enters into only the first light-receiving element 4 a.The reflected light does not enter into the second light-receivingelement 4 b. Immediately after the moving object 11 reaches in front ofthe first light-receiving element 4 a, the binary signal PDA of thefirst comparator 33 is not high-level at least two times in a row at thetiming of the light emitted by the light-emitting element 3, andtherefore the output signal SA of the first synchronizing detectioncircuit 34 is held at low-level. Additionally, because the binary signalPDB of the second comparator 37 is held at low-level, the secondsynchronizing detection circuit 38 holds the output signal SB atlow-level. The holding signal J of the output holding circuit 39 staysat high-level. At this time, because the output signals SA and SB of thefirst and second synchronizing detection circuits 34 and 38 respectivelyare low-level, the output determination circuit 41 holds the outputsignals K and L at high-level. Also, the output circuit 44 holds theoutput signal Vo at low-level.

In FIG. 8, the period from time t2 to time t3 is a period in which themoving object 11 is in the passage position Q3, or in other words, is infront of the first and second light-receiving elements 4 a and 4 b. Whenthe moving object 11 reaches in front of the second light-receivingelement 4 b while it is also in front of the first light-receivingelement 4 a, the light pulse from the light-emitting element 3 isreflected by the moving object 11 and enters into the first and secondlight-receiving elements 4 a and 4 b. For this reason, the binarysignals PDA and PDB of the first and second comparators 33 and 37 areboth high-level, in synchronization with the light pulse from thelight-emitting element 3. The first synchronizing detection circuit 34samples the binary signal PDA of the first comparator 33 at the timingat which light is emitted from the light-emitting element 3, andswitches the output signal SA to high-level when the binary signal PDAis high-level two times in a row. In the same manner, the secondsynchronizing detection circuit 38 samples the binary signal PDB of thesecond comparator 37 at the timing at which light is emitted from thelight-emitting element 3, and switches the output signal SB tohigh-level when the binary signal PDB is high-level two times in a row.When the output signal SA switches from low-level to high-level, theoutput signal SB is low-level and the output signal SA is high-level,and thus the output holding circuit 39 switches the holding signal J tohigh-level until the output signal SB switches to high-level. At thistime, the output determination circuit 41 holds the output signal K atlow-level, the holding signal J having switched to high-level. Inresponse to the output signal K becoming low-level, the output circuit44 switches the output signal Vo to high-level. In other words, if theoutput signal SB is low-level (if the moving object 11 has started tomove in the forward direction) when the output signal SA switches tohigh-level, the output signal K of the output determination circuit 41is set to low-level, and the output signal Vo is switched to high-level.

In FIG. 8, the period from time t3 to time t4 is a period in which themoving object 11 is in the passage position Q4, or in other words, is infront of the second light-receiving element 4 b. Because the movingobject 11 moves past the first light-receiving element 4 a and is infront of only the second light-receiving element 4 b, the pulse lightfrom the light-emitting element 3 is reflected by the moving object 11and enters into only the second light-receiving element 4 b. Immediatelyafter the moving object 11 passes from in front of the firstlight-receiving element 4 a, the binary signal PDA of the firstcomparator 33 is not low-level at least two times in a row at the timingof the light emitted by the light-emitting element 3, and therefore theoutput signal SA of the first synchronizing detection circuit 34 is heldat high-level. Because the binary signal PDB is held at a cyclichigh-level, the second synchronizing detection circuit 38 holds theoutput signal SB at high-level. The holding signal J of the outputholding circuit 39 stays at low-level. At this time, the outputdetermination circuit 41 holds the output signals K and L at high-level,in accordance with the output signals SA and SB of the first and secondsynchronizing detection circuits 34 and 38 respectively beinghigh-level. Because the output signals K and L of the outputdetermination circuit 41 are held at high-level, the output circuit 44holds the output signal Vo at high-level.

In FIG. 8, the period from time t4 to time t5 is a period in which themoving object 11 is in the passage position Q5, or in other words, isimmediately after the first and second light-receiving elements 4 a and4 b. After the moving object 11 has passed in front of the first andsecond light-receiving elements 4 a and 4 b, the pulse light from thelight-emitting element 3 is not reflected by the moving object 11 anddoes not enter into the first and second light-receiving elements 4 aand 4 b; the binary signals PDA and PDB of the first and secondcomparators 33 and 37 are low-level. The first synchronizing detectioncircuit 34 switches the output signal SA to low-level when the binarysignal PDA is low-level two times in a row at the timing at which lightis emitted from the light-emitting element 3. In the same manner, thesecond synchronizing detection circuit 38 switches the output signal SBto low-level when the binary signal PDB is low-level two times in a rowat the timing at which light is emitted from the light-emitting element3. When the output signal SA of the first synchronizing detectioncircuit 34 switches from high-level to low-level, the output signal SBof the second synchronizing detection circuit 38 is high-level; however,because the output signal SA is low-level, the output holding circuit 39holds the holding signal J at low-level. In addition, when the outputsignal SB switches from high-level to low-level, the output signal SA islow-level, and thus the output determination circuit 41 puts the outputsignal L at low-level for one pulse (puts the outputs signal L atlow-level for one pulse in response to the passage of the moving object11 in the forward direction ending). In response to the output signal Lof the output determination circuit 41 going to low-level, the outputcircuit 44 switches the output signal Vo to low-level.

Thereafter, in the same manner, the operations in the period from timet0 to time t5 are repeated as long as moving objects 11 pass in front ofthe first and second light-receiving elements 4 a and 4 b in the forwarddirection D; each time a moving object 11 passes through, the outputsignal Vo of the output circuit 44 goes to high-level. Therefore, thenumber of moving objects 11 can be counted by counting the number oftimes the output signal Vo goes to high-level.

It should be noted that although the first and second synchronizingdetection circuits 34 and 38 switch the levels of their output signalswhen the detection outputs of the light-receiving elements go tohigh-level or low-level at least two times in a row at the timing atwhich light is emitted from the light-emitting element 3, the levels ofthe output signals may also be switched when the detection outputs go tohigh-level or low-level at least three times in a row. In addition,switching the levels of the outputs signals of the first and secondsynchronizing detection circuits 34 and 38 may be performed at thestarting point of the timing at which light is emitted from thelight-emitting element, or may be performed at the ending point of thetiming at which light is emitted from the light-emitting element.Furthermore, while the presence/absence of the moving object 11indicating whether or not a moving object 11 is passing in front of thesecond light-receiving element 4 b and the output signal SA of the firstsynchronizing detection circuit 34 change in synchronization, there isno correlation herein.

Next, referring to the timing chart of FIG. 9, descriptions shall begiven regarding operations when a moving object 11 rebounds and passesin front of the first and second light-receiving elements 4 a and 4 b inthe reverse direction after having passed in front of the first andsecond light-receiving elements 4 a and 4 b in the forward direction D.

Note that in the same manner as FIG. 8, FIG. 9 shows the pulse-formsignal SP; the presence/absence of the moving object 11 in front of thefirst and second light-receiving elements 4 a and 4 b; the binarysignals PDA and PDB of the first and second comparators 33 and 37respectively; the output signals SA and SB of the first and secondsynchronizing detection circuits 34 and 38 respectively; the holdingsignal J of the output holding circuit 39; the output signals K and L ofthe output determination circuit 41; and the output signal Vo of theoutput circuit 44.

Additionally, when the moving object 11 passes in front of the first andsecond light-receiving elements 4 a and 4 b in the forward direction D,the same operations indicated in time t0 to time t5 in FIG. 8 arecarried out; accordingly, descriptions of these operations shall beomitted, and descriptions shall instead be given from time t5, when themoving object 11 has rebounded and returned.

In FIG. 9, the period from time t5 to time t6 is a period in which themoving object 11 is in the passage position Q4, or in other words, is infront of the second light-receiving element 4 b, having rebounded andreturned. Because the moving object 11 is in front of only the secondlight-receiving element 4 b, the pulse light from the light-emittingelement 3 is reflected by the moving object 11 and enters into only thesecond light-receiving element 4 b. The reflected light does not enterinto the first light-receiving element 4 a. Immediately after the movingobject 11 reaches in front of the second light-receiving element 4 b,the binary signal PDB of the second comparator 37 is not high-level atleast two times in a row at the timing of the light emitted by thelight-emitting element 3, and therefore the output signal SB of thesecond synchronizing detection circuit 38 is held at low-level.Additionally, because the binary signal PDA of the first comparator 33is held at low-level, the first synchronizing detection circuit 34 holdsthe output signal SA at low-level. Because the output signal SA of thefirst synchronizing detection circuit 34 has not been switched, theoutput holding circuit 39 holds the holding signal J at low-level. Atthis time, because the output signals SA and SB of the first and secondsynchronizing detection circuits 34 and 38 respectively are low-level,the output determination circuit 41 holds the output signals K and L athigh-level. Also, because the output signals K and L are high-level, theoutput circuit 44 holds the output signal Vo at low-level.

In FIG. 9, the period from time t6 to time t7 is a period in which themoving object 11 is in the passage position Q3, or in other words, is infront of the first and second light-receiving elements 4 a and 4 b. Whenthe moving object 11 reaches in front of the first light-receivingelement 4 a while it is also in front of the second light-receivingelement 4 b, the light pulse from the light-emitting element 3 isreflected by the moving object 11 and enters into the first and secondlight-receiving elements 4 a and 4 b. For this reason, the binarysignals PDA and PDB of the first and second comparators 33 and 37 areboth high-level, in synchronization with the light pulse from thelight-emitting element 3. The second synchronizing detection circuit 38switches the output signal SB to high-level when the binary signal PDBof the second comparator 37 is high-level two times in a row at thetiming at which light is emitted from the light-emitting element 3.Next, the first synchronizing detection circuit 34 switches the outputsignal SA to high-level when the binary signal PDA of the firstcomparator 33 is high-level two times in a row at the timing at whichlight is emitted from the light-emitting element 3. When the outputsignal SA of the first synchronizing detection circuit 34 switches fromlow-level to high-level, the output signal SB of the secondsynchronizing detection circuit 38 is high-level (the moving object 11has passed in the reverse direction), and therefore the output holdingcircuit 39 holds the holding signal J at low-level. Because the holdingsignal J of the output holding circuit 39 is held at low-level, theoutput determination circuit 41 holds the output signal K at high-level.In addition, when the output signal SB of the second synchronizingdetection circuit 38 switches from low-level to high-level, the outputsignal SA of the first synchronizing detection circuit 34 is low-level;thus the output determination circuit 41 determines that the movingobject 11 has begun passing in the reverse direction, and switches theoutput signal L to low-level. Because the output signal K from theoutput determination circuit 41 is held at high-level, the outputcircuit 44 holds the output signal Vo at low-level.

In other words, when the moving object 11 has begun passing in thereverse direction, the holding signal J of the output holding circuit 39is not switched to high-level and rather remains at low-level. Based onthis, the output signal K of the output determination circuit 41 is alsoheld at high-level, and the output signal Vo is held at low-level.

In FIG. 9, the period from time t7 to time t8 is a period in which themoving object 11 is in the passage position Q2, or in other words, is infront of the first light-receiving element 4 a. Because the movingobject 11 is in front of only the first light-receiving element 4 ahaving passed by the front of the second light-receiving element 4 b,the pulse light from the light-emitting element 3 is reflected by themoving object 11 and enters into only the first light-receiving element4 a. Immediately after the moving object 11 passes in front of thesecond light-receiving element 4 b, the binary signal PDB of the secondcomparator 37 is not low-level at least two times in a row at the timingof the light emitted by the light-emitting element 3, and therefore theoutput signal SB of the second synchronizing detection circuit 38 isheld at high-level. Because the binary signal PDA is held at a cyclichigh-level, the first synchronizing detection circuit 34 holds theoutput signal SA at high-level.

In FIG. 9, the period from time t8 to time t9 is a period in which themoving object 11 is in the passage position Q1, or in other words, isimmediately before the first and second light-receiving elements 4 a and4 b. When the moving object 11 passes in front of the first and secondlight-receiving elements 4 a and 4 b in the reverse direction, the lightpulse from the light-emitting element 3 is not reflected by the movingobject 11 and does not enter into the first and second light-receivingelements 4 a and 4 b; thus, the binary signals PDA and PDB of the firstand second comparators 33 and 37 are low-level. The first synchronizingdetection circuit 34 switches the output signal SA to low-level when thebinary signal PDA is low-level two times in a row at the timing at whichlight is emitted from the light-emitting element 3. In addition, thesecond synchronizing detection circuit 38 switches the output signal SBto low-level when the binary signal PDB is low-level two times in a rowat the timing at which light is emitted from the light-emitting element3. The holding signal J of the output holding circuit 39 stays atlow-level. The output determination circuit 41 holds the output signal Kat high-level, based on the holding signal J being low-level. Inaddition, when the output signal SB of the second synchronizingdetection circuit 38 switches from high-level to low-level, the outputsignal SA of the first synchronizing detection circuit 34 is high-level;therefore, the output determination circuit 41 determines that thepassage of the moving object 11 in the reverse direction has ended, andholds the output signal L at low-level. The output circuit 44 holds theoutput signal Vo at low-level based on the output signals K and L of theoutput determination circuit 41.

In FIG. 9, the period from time t9 to time t10 is a period in which themoving object 11 is in the passage position Q2, or in other words, haspassed in front of the first and second light-receiving elements 4 a and4 b in the reverse direction but has once again moved in the forwarddirection D and is in front of the first light-receiving element 4 a.Because the moving object 11 is in front of only the firstlight-receiving element 4 a, the pulse light from the light-emittingelement 3 enters into only the first light-receiving element 4 a. Thepulse light does not enter into the second light-receiving element 4 b.Because this is immediately after the moving object 11 has reached infront of the first light-receiving element 4 a, the binary signal PDA ofthe first comparator 33 is not high-level at least two times in a row,and therefore the output signal SA of the first synchronizing detectioncircuit 34 is held at low-level. Additionally, because the binary signalPDB of the second comparator 37 is held at low-level, the secondsynchronizing detection circuit 38 holds the output signal SB atlow-level. The holding signal J of the output holding circuit 39 staysat low-level. At this time, the output determination circuit 41 holdsthe output signal K at high-level and the output signal L at low-level.Based on this, the output circuit 44 holds the output signal Vo atlow-level.

In FIG. 9, the period from time t10 to time t11 is a period in which themoving object 11 is in the passage position Q3, or in other words, is infront of the first and second light-receiving elements 4 a and 4 b. Whenthe moving object 11 reaches in front of the second light-receivingelement 4 b while it is also in front of the first light-receivingelement 4 a, the light pulse from the light-emitting element 3 entersinto the first and second light-receiving elements 4 a and 4 b. For thisreason, the binary signals PDA and PDB of the first and secondcomparators 33 and 37 are both high-level, in synchronization with thelight pulse from the light-emitting element 3. The first synchronizingdetection circuit 34 switches the output signal SA to high-level whenthe binary signal PDA of the first comparator 33 is high-level two timesin a row. In the same manner, the second synchronizing detection circuit38 switches the output signal SB to high-level when the binary signalPDB of the second comparator 37 is high-level two times in a row. Whenthe output signal SA of the first synchronizing detection circuit 34switches from low-level to high-level, the output signal SB of thesecond synchronizing detection circuit 38 is low-level, and the outputsignal SA is high-level; however, because the output signal SB of thesecond synchronizing detection circuit 38 was low-level (the movingobject 11 one previous to the present moving object 11 finished passingin the reverse direction) when the output signal SA of the firstsynchronizing detection circuit 34 switched from high-level to low-levelin the period from time t8 to time t9, the output holding circuit 39holds the holding signal J at low-level. Based on the holding signal Jbeing low-level, the output determination circuit 41 holds the outputsignal K at high-level, and holds the output signal L at low-level.

In FIG. 9, the period from time t11 to time t12 is a period in which themoving object 11 is in the passage position Q4, or in other words, is infront of the second light-receiving element 4 b. Because the movingobject 11 moves past the first light-receiving element 4 a and is infront of only the second light-receiving element 4 b, the pulse lightfrom the light-emitting element 3 enters into only the secondlight-receiving element 4 b. Immediately after the moving object 11passes from in front of the first light-receiving element 4 a, thebinary signal PDA of the first comparator 33 is not low-level at leasttwo times in a row, and therefore the output signal SA of the firstsynchronizing detection circuit 34 is held at high-level. Because thebinary signal PDB is held at a cyclic high-level, the secondsynchronizing detection circuit 38 holds the output signal SB athigh-level. The output holding circuit 39 holds the holding signal J atlow-level. In addition, because the holding signal J is low-level, theoutput determination circuit 41 holds the output signal K at high-level,and keeps the output signal L at low-level. Along with this, the outputcircuit 44 holds the output signal Vo at low-level.

In FIG. 9, the period from time t12 to time t13 is a period in which themoving object 11 is in the passage position Q5, or in other words, isimmediately after the first and second light-receiving elements 4 a and4 b. When the moving object 11 passes in front of the first and secondlight-receiving elements 4 a and 4 b, the light pulse from thelight-emitting element 3 does not enter into the first and secondlight-receiving elements 4 a and 4 b; thus, the binary signals PDA andPDB of the first and second comparators 33 and 37 are low-level. Thefirst synchronizing detection circuit 34 switches the output signal SAto low-level when the binary signal PDA is low-level two times in a row.In the same manner, the second synchronizing detection circuit 38switches the output signal SB to low-level when the binary signal PDB islow-level two times in a row. The output holding circuit 39 holds theholding signal J at low-level. At this time, the output determinationcircuit 41 holds the output signal K at high-level based on the holdingsignal J being low-level. In addition, when the output signal SB of thesecond synchronizing detection circuit 38 switches from high-level tolow-level, the output signal SA of the first synchronizing detectioncircuit 34 is low-level (the moving object 11 has finished passing inthe forward direction); thus the output determination circuit 41switches the output signal L from low-level to high-level. Because theoutput signal K is held at low-level, the output circuit 44 holds theoutput signal Vo at low-level.

In this manner, in the period from time t6 to time t12 shown in FIG. 9,the moving object 11 rebounds and returns, passing in front of the firstand second light-receiving elements 4 a and 4 b in the reversedirection, and furthermore, the moving object 11 once again passes infront of the first and second light-receiving elements 4 a and 4 b inthe forward direction D; however, because the output signal K of theoutput determination circuit 41 is held at high-level, the output signalVo of the output circuit 44 is not switched to high-level, and thereforethe moving object 11 is not determined to have passed. In the periodfrom time t0 to time t5, which is prior to the rebound and return, themoving object 11 has already passed in front of the first and secondlight-receiving elements 4 a and 4 b in the forward direction D, andthis passage has already been determined to have occurred; therefore, asecond passage is not determined to have occurred even if the movingobject 11 once again passes in the forward direction D after havingrebounded and returned in the reverse direction. Through this, theoutput signal Vo only becomes high-level once in response to the passageof the same moving object 11, and thus errors do not arise in thecounting of the moving object 11.

In FIG. 9, from time t13 on, the operations of the period from time t0to time t5 as shown in FIG. 8 are repeated as long as the moving object11 passes in front of the first and second light-receiving elements 4 aand 4 b in the forward direction D, and each time the moving object 11passes, the output signal Vo of the output circuit 44 becomeshigh-level.

Next, referring to the timing chart of FIG. 10, descriptions shall begiven regarding operations when a moving object 11 passes in front ofthe first and second light-receiving elements 4 a and 4 b in the forwarddirection D, rebounds at the passage position Q3, and then once againpasses through in the forward direction D.

Note that in the same manner as FIG. 8, FIG. 10 shows the pulse-formsignal SP; the presence/absence of the moving object 11 in front of thefirst and second light-receiving elements 4 a and 4 b; the binarysignals PDA and PDB; the output signals SA and SB; the output signals Kand L of the output determination circuit 41; and the output signal Voof the output circuit 44.

Additionally, when the moving object 11 passes in front of the first andsecond light-receiving elements 4 a and 4 b in the forward direction D,the same operations indicated in time t0 to time t5 in FIG. 8 arecarried out; accordingly, descriptions of these operations shall beomitted, and descriptions shall instead be given of the operations fromtime t5, immediately prior to the next moving object 11 rebounding andreturning at the passage position Q3.

In FIG. 10, the period from time t5 to time t6 is a period in which themoving object 11 is in the passage position Q2, or in other words, is infront of the first light-receiving element 4 a. Because the movingobject 11 crosses in front of only the first light-receiving element 4a, the pulse light from the light-emitting element 3 enters into onlythe first light-receiving element 4 a. The pulse light does not enterinto the second light-receiving element 4 b. Immediately after themoving object 11 reaches in front of the first light-receiving element 4a, the binary signal PDA of the first comparator 33 is not high-level atleast two times in a row, and therefore the output signal SA of thefirst synchronizing detection circuit 34 is held at low-level.Additionally, because the binary signal PDB of the second comparator 37is held at low-level, the second synchronizing detection circuit 38holds the output signal SB at low-level. The output holding circuit 39sets the holding signal J to low-level. At this time, the outputdetermination circuit 41 holds the output signals K and L at high-level,in accordance with the output signals SA and SB of the first and secondsynchronizing detection circuits 34 and 38 respectively being low-level.Because the output signals K and L are high-level, the output circuit 44holds the output signal Vo at low-level.

In FIG. 10, the period from time t6 to time t7 is a period in which themoving object 11 is in the passage position Q3, or in other words, is infront of the first and second light-receiving elements 4 a and 4 b.Because the moving object 11 has moved further and is in front of thefirst and second light-receiving elements 4 a and 4 b, the pulse lightfrom the light-emitting element 3 enters into the first and secondlight-receiving elements 4 a and 4 b. For this reason, the binarysignals PDA and PDB of the first and second comparators 33 and 37 bothbecome high-level. When the binary signals PDA and PDB of the first andsecond comparators 33 and 37 are high-level two times in a row, thefirst and second synchronizing detection circuits 34 and 38 switch theirrespective output signals SA and SB to high-level. When the outputsignal SA switches from low-level to high-level, the output signal SB islow-level and the output signal SA is high-level, and thus the outputholding circuit 39 switches the holding signal J to high-level until theoutput signal SB switches to high-level. At this time, the outputdetermination circuit 41 sets the output signal K to low-level inresponse to the holding signal J of the output holding circuit 39becoming high-level. In response to the output signal K being low-level,the output circuit 44 switches the output signal Vo to high-level. Inother words, if the output signal SB is low-level (if the moving object11 has started to move in the forward direction) when the output signalSA switches to high-level, the output signal K of the outputdetermination circuit 41 is set to low-level, and the output signal Vois switched to high-level.

In FIG. 10, the period from time t7 to time t8 is a period in which themoving object 11 rebounds in passage position Q3 and returns to passageposition Q2. Because the moving object 11 returns from in front of thesecond light-receiving element 4 b and is in front of only the firstlight-receiving element 4 a, the pulse light from the light-emittingelement 3 enters into only the first light-receiving element 4 a.Immediately after the moving object 11 returns from in front of thesecond light-receiving element 4 b, the binary signal PDB of the secondcomparator 37 is not low-level at least two times in a row, andtherefore the output signal SB of the second synchronizing detectioncircuit 38 is held at high-level. Because the binary signal PDA is heldat a cyclic high-level, the first synchronizing detection circuit 34holds the output signal SA at high-level. The holding signal J of theoutput holding circuit 39 stays at low-level. At this time, the outputdetermination circuit 41 holds the output signals K and L at high-level,in accordance with the output signals SA and SB of the first and secondsynchronizing detection circuits 34 and 38 respectively beinghigh-level. Because the output signals K and L of the outputdetermination circuit 41 are held at high-level, the output circuit 44holds the output signal Vo at high-level.

In FIG. 10, the period from time t8 to time t9 is a period in which themoving object 11 is in the passage position Q1, or in other words, hasreturned to immediately before the first and second light-receivingelements 4 a and 4 b. When the moving object 11 returns from in front ofthe first and second light-receiving elements 4 a and 4 b in the reversedirection, the light pulse from the light-emitting element 3 does notenter into the first and second light-receiving elements 4 a and 4 b;thus, the binary signals PDA and PDB of the first and second comparators33 and 37 are low-level. When the binary signals PDA and PDB of thefirst and second comparators 33 and 37 are low-level two times in a row,the first and second synchronizing detection circuits 34 and 38 switchtheir respective output signals SA and SB to low-level. The holdingsignal J of the output holding circuit 39 stays at low-level. The outputdetermination circuit 41 holds the output signal K at high-level, basedon the holding signal J being low-level. In addition, when the outputsignal SB of the second synchronizing detection circuit 38 switches fromhigh-level to low-level, the output signal SA of the first synchronizingdetection circuit 34 is high-level; therefore, the output determinationcircuit 41 determines that the passage of the moving object 11 in thereverse direction has ended, and holds the output signal L athigh-level. Because the output signals K and L of the outputdetermination circuit 41 are both held at high-level, the output circuit44 holds the output signal Vo at high-level.

In FIG. 10, the period from time t9 to time t10 is a period in which themoving object 11 is in the passage position Q2, or in other words, hasreturned from in front of the first and second light-receiving elements4 a and 4 b in the reverse direction but has once again moved in theforward direction D and is in front of the first light-receiving element4 a. Because the moving object 11 is in front of only the firstlight-receiving element 4 a, the pulse light from the light-emittingelement 3 enters into only the first light-receiving element 4 a. Thepulse light does not enter into the second light-receiving element 4 b.Also, because this is immediately after the moving object 11 has reachedin front of the first light-receiving element 4 a, the binary signal PDAof the first comparator 33 is not high-level at least two times in arow, and therefore the output signal SA of the first synchronizingdetection circuit 34 is held at low-level. Additionally, because thebinary signal PDB of the second comparator 37 is held at low-level, thesecond synchronizing detection circuit 38 holds the output signal SB atlow-level. The holding signal J of the output holding circuit 39 staysat low-level. At this time, the output determination circuit 41 holdsthe output signals K and L at high-level, in accordance with the outputsignals SA and SB of the first and second synchronizing detectioncircuits 34 and 38 respectively being low-level. Because the outputsignals K and L are high-level, the output circuit 44 does not switchthe output signal Vo, and holds the output signal Vo at high-level.

In FIG. 10, the period from time t10 to time t11 is a period in whichthe moving object 11 is in the passage position Q3, or in other words,has moved along further and is in front of the first and secondlight-receiving elements 4 a and 4 b. In this state, the pulse lightfrom the light-emitting element 3 enters into the first and secondlight-receiving elements 4 a and 4 b. For this reason, the binarysignals PDA and PDB of the first and second comparators 33 and 37 bothbecome high-level. When the binary signals PDA and PDB of the first andsecond comparators 33 and 37 are high-level two times in a row, thefirst and second synchronizing detection circuits 34 and 38 switch theirrespective output signals SA and SB to high-level. When the outputsignal SA of the first synchronizing detection circuit 34 switches fromlow-level to high-level, the output signal SB of the secondsynchronizing detection circuit 38 is low-level, and the output signalSA is high-level; however, because the output signal SB of the secondsynchronizing detection circuit 38 was low-level (the moving object 11one previous to the present moving object 11 finished passing in thereverse direction) when the output signal SA of the first synchronizingdetection circuit 34 switched from high-level to low-level in the periodfrom time t8 to time t9, the output holding circuit 39 holds the holdingsignal J at low-level. At this time, because the holding signal J of theoutput holding circuit 39 is low-level, the output determination circuit41 holds the output signal K at high-level. Because the output signals Kand L are held at high-level, the output circuit 44 holds the outputsignal Vo at high-level. In other words, the moving object 11 beginspassing in the forward direction, but because the previous moving object11 has finished passing in the reverse direction, the output signal Vois held at high-level.

In FIG. 10, the period from time t11 to time t12 is a period in whichthe moving object 11 is in the passage position Q4, or in other words,is in front of the second light-receiving element 4 b. In this state,the pulse light from the light-emitting element 3 enters into only thesecond light-receiving element 4 b. Immediately after the moving object11 passes from in front of the first light-receiving element 4 a, thebinary signal PDA of the first comparator 33 is not low-level at leasttwo times in a row, and therefore the output signal SA of the firstsynchronizing detection circuit 34 is held at high-level. Because thebinary signal PDB is held at a cyclic high-level, the secondsynchronizing detection circuit 38 holds the output signal SB athigh-level. The holding signal J of the output holding circuit 39 staysat low-level. At this time, the output determination circuit 41 holdsthe output signals K and L at high-level, in accordance with the outputsignals SA and SB of the first and second synchronizing detectioncircuits 34 and 38 respectively being high-level. Because the outputsignals K and L of the output determination circuit 41 are held athigh-level, the output circuit 44 holds the output signal Vo athigh-level.

In FIG. 10, the period from time t12 to time t13 is a period in whichthe moving object 11 is in the passage position Q5, or in other words,is immediately after the first and second light-receiving elements 4 aand 4 b. In this state, the pulse light from the light-emitting element3 does not enter into the first and second light-receiving elements 4 aand 4 b, and thus the binary signals PDA and PDB of the first and secondcomparators 33 and 37 are low-level. When the binary signals PDA and PDBof the first and second comparators 33 and 37 are low-level two times ina row, the first and second synchronizing detection circuits 34 and 38switch their respective output signals SA and SB to low-level. When theoutput signal SA of the first synchronizing detection circuit 34switches from high-level to low-level, the output signal SB of thesecond synchronizing detection circuit 38 is high-level; therefore, theoutput holding circuit 39 keeps the holding signal J at low-level. Atthis time, because the holding signal J is low-level, the outputdetermination circuit 41 holds the output signal K at high-level. Inaddition, when the output signal SB of the second synchronizingdetection circuit 38 switches from high-level to low-level, the outputsignal SA of the first synchronizing detection circuit 34 is low-level;thus the output determination circuit 41 puts the output signal L atlow-level for one pulse. In response to the output signal L becominglow-level, the output circuit 44 switches the output signal Vo fromhigh-level to low-level.

In this manner, in the period from time t8 to time t12 shown in FIG. 10,the moving object 11 rebounds and returns at passage position Q3, andonce again moves to in front of the first and second light-receivingelements 4 a and 4 b; however, the output signal Vo is held athigh-level and is not switched to low-level. Then, in the period fromtime t12 to time t13, when the moving object 11 passes in front of thefirst and second light-receiving elements 4 a and 4 b in the forwarddirection D, the output signals SA and SB of the first and secondsynchronizing detection circuits 34 and 38 are switched to low-level, inresponse to which the output signal Vo is switched to low-level. Throughthis, even if the moving object 11 rebounds during passage, the outputsignal Vo goes to high-level only once up until the moving object 11 hascompletely passed through, and thus errors do not arise in the countingof the moving object 11.

In FIG. 10, from time t13 on, the operations of the period from time totime t5 as shown in FIG. 8 are repeated as long as the moving object 11passes in front of the first and second light-receiving elements 4 a and4 b in the forward direction D, and each time the moving object 11passes, the output signal Vo of the output circuit 44 becomeshigh-level.

Next, referring to the timing chart of FIG. 11, descriptions shall begiven regarding operations when a moving object 11 passes to in front ofthe first light-receiving element 4 a in the forward direction D,rebounds at the passage position Q2, and then once again passes throughin the forward direction D.

Note that in the same manner as FIG. 8, FIG. 11 shows the pulse-formsignal SP; the presence/absence of the moving object 11 in front of thefirst and second light-receiving elements 4 a and 4 b; the binarysignals PDA and PDB; the output signals SA and SB; the signals K and L;and the output signal Vo.

Additionally, when the moving object 11 passes in front of the first andsecond light-receiving elements 4 a and 4 b in the forward direction D,the same operations indicated in time t0 to time t5 in FIG. 8 arecarried out; accordingly, descriptions of these operations shall beomitted, and descriptions shall instead be given of the operations fromtime t5, immediately prior to the next moving object 11 rebounding andreturning at the passage position Q2.

In FIG. 11, the period from time t5 to time t6 is a period in which themoving object 11 is in the passage position Q2, or in other words, is infront of the first light-receiving element 4 a. Because the movingobject 11 is in front of only the first light-receiving element 4 a, andhas rebounded and returned before reaching the second light-receivingelement 4 b, the pulse light from the light-emitting element 3 entersinto only the first light-receiving element 4 a. The pulse light doesnot enter into the second light-receiving element 4 b. For this reason,the binary signal PDA of the first comparator 33 becomes high-level, butthe binary signal PDB of the second comparator 37 stays at low-level.The first synchronizing detection circuit 34 switches the output signalSA to high-level when the binary signal PDA of the first comparator 33is high-level two times in a row. In addition, the second synchronizingdetection circuit 38 holds the output signal SB at low-level. When theoutput signal SA of the first synchronizing detection circuit 34switches from low-level to high-level, the output signal SB of thesecond synchronizing detection circuit 38 is low-level, and thereforethe output holding circuit 39 outputs one pulse of a high-level holdingsignal J. At this time, the output determination circuit 41 puts theoutput signal K at low-level for one pulse in response to the holdingsignal J having been put at high-level for one pulse. In addition,because the output signal SB of the second synchronizing detectioncircuit 38 stays at low-level, the output determination circuit 41 holdsthe output signal L at high-level. In response to the output signal Kbecoming low-level, the output circuit 44 switches the output signal Vofrom low-level to high-level.

In FIG. 11, the period from time t6 to time t7 is a period in which themoving object 11 is in the passage position Q1, or in other words, isimmediately before the first and second light-receiving elements 4 a and4 b. When the moving object 11 returns from in front of the first andsecond light-receiving elements 4 a and 4 b in the reverse direction,the light pulse from the light-emitting element 3 does not enter intothe first and second light-receiving elements 4 a and 4 b; thus, thebinary signals PDA and PDB of the first and second comparators 33 and 37are low-level. The first synchronizing detection circuit 34 switches theoutput signal SA to low-level when the binary signal PDA of the firstcomparator 33 is low-level two times in a row. In addition, the secondsynchronizing detection circuit 38 holds the output signal SB atlow-level. The holding signal J of the output holding circuit 39 staysat low-level. At this time, because the holding signal J is low-level,the output determination circuit 41 holds the output signal K athigh-level. In addition, because the output signal SB of the secondsynchronizing detection circuit 38 stays at low-level, the outputdetermination circuit 41 holds the output signal L at high-level.Because the output signals K and L from the output determination circuit41 are both held at high-level, the output circuit 44 holds the outputsignal Vo at high-level.

In FIG. 11, the period from time t7 to time t8 is a period in which themoving object 11 is in the passage position Q2, or in other words, is infront of the first light-receiving element 4 a. Because the movingobject 11 is in front of only the first light-receiving element 4 a, thepulse light from the light-emitting element 3 enters into only the firstlight-receiving element 4 a. The pulse light does not enter into thesecond light-receiving element 4 b. Immediately after the moving object11 reaches in front of the first light-receiving element 4 a, the binarysignal PDA of the first comparator 33 is not high-level at least twotimes in a row, and therefore the output signal SA of the firstsynchronizing detection circuit 34 is held at low-level. Additionally,because the binary signal PDB of the second comparator 37 is held atlow-level, the second synchronizing detection circuit 38 holds theoutput signal SB at low-level. The holding signal J of the outputholding circuit 39 is at low-level. At this time, the outputdetermination circuit 41 holds the output signals K and L at high-level,in accordance with the output signals SA and SB of the first and secondsynchronizing detection circuits 34 and 38 respectively being low-level.Because the output signals K and L stay at high-level, the outputcircuit 44 holds the output signal Vo at high-level.

In FIG. 11, the period from time t8 to time t9 is a period in which themoving object 11 is in the passage position Q3, or in other words, is infront of the first and second light-receiving elements 4 a and 4 b.Because the moving object 11 has moved further and is in front of thefirst and second light-receiving elements 4 a and 4 b, the pulse lightfrom the light-emitting element 3 enters into both the first and secondlight-receiving elements 4 a and 4 b. For this reason, the binarysignals PDA and PDB of the first and second comparators 33 and 37 bothbecome high-level. When the binary signals PDA and PDB of the first andsecond comparators 33 and 37 are high-level two times in a row, thefirst and second synchronizing detection circuits 34 and 38 switch theirrespective output signals SA and SB to high-level. When the outputsignal SA of the first synchronizing detection circuit 34 switches fromlow-level to high-level, the output signal SB of the secondsynchronizing detection circuit 38 is low-level, and the output signalSA of the first synchronizing detection circuit 34 is high-level;however, because the output signal SB of the second synchronizingdetection circuit 38 was low-level when the output signal SA of thefirst synchronizing detection circuit 34 switched from high-level tolow-level in the period from time t6 to time t7, the output holdingcircuit 39 holds the holding signal J at low-level. At this time,because the holding signal J of the output holding circuit 39 islow-level, the output determination circuit 41 holds the output signal Kat high-level. In addition, because the output signal K is high-level,the output circuit 44 holds the output signal Vo at high-level.

In FIG. 11, the period from time t9 to time t10 is a period in which themoving object 11 is in the passage position Q4, or in other words, is infront of the second light-receiving element 4 b. In this state, thepulse light from the light-emitting element 3 enters into only thesecond light-receiving element 4 b. Immediately after the moving object11 passes from in front of the first light-receiving element 4 a, thebinary signal PDA of the first comparator 33 is not low-level at leasttwo times in a row, and therefore the output signal SA of the firstsynchronizing detection circuit 34 is held at high-level. Because thebinary signal PDB is held at a cyclic high-level, the secondsynchronizing detection circuit 38 holds the output signal SB athigh-level. The holding signal J of the output holding circuit 39 staysat low-level. At this time, the output determination circuit 41 holdsthe output signals K and L at high-level, in accordance with the outputsignals SA and SB of the first and second synchronizing detectioncircuits 34 and 38 respectively being high-level. Because the outputsignals K and L of the output determination circuit 41 are held athigh-level, the output circuit 44 holds the output signal Vo athigh-level.

In FIG. 11, the period from time t10 to time t11 is a period in whichthe moving object 11 is in the passage position Q5, or in other words,is immediately after the first and second light-receiving elements 4 aand 4 b. In this state, the pulse light from the light-emitting element3 does not enter into the first and second light-receiving elements 4 aand 4 b, and thus the binary signals PDA and PDB of the first and secondcomparators 33 and 37 are low-level. When the binary signals PDA and PDBof the first and second comparators 33 and 37 are low-level two times ina row, the first and second synchronizing detection circuits 34 and 38switch their respective output signals SA and SB to low-level. When theoutput signal SA of the first synchronizing detection circuit 34switches from high-level to low-level, the output signal SB of thesecond synchronizing detection circuit 38 is high-level; therefore, theoutput holding circuit 39 keeps the holding signal J at low-level. Atthis time, because the holding signal J is low-level, the outputdetermination circuit 41 holds the output signal K at high-level. Inaddition, when the output signal SB of the second synchronizingdetection circuit 38 switches from high-level to low-level, the outputsignal SA of the first synchronizing detection circuit 34 is low-level;thus the output determination circuit 41 puts the output signal L atlow-level for one pulse. In response to the output signal L becominglow-level, the output circuit 44 switches the output signal Vo fromhigh-level to low-level.

Next, referring to the timing chart of FIG. 12, descriptions shall begiven regarding operations when a moving object 11 passes in front ofthe first and second light-receiving elements 4 a and 4 b in the forwarddirection D, rebounds at the passage position Q4, and then once againpasses through in the forward direction D.

Note that in the same manner as FIG. 8, FIG. 12 shows the pulse-formsignal SP; the presence/absence of the moving object 11 in front of thefirst and second light-receiving elements 4 a and 4 b; the binarysignals PDA and PDB; the output signals SA and SB; the signals K and L;and the output signal Vo.

Additionally, when the moving object 11 passes in front of the first andsecond light-receiving elements 4 a and 4 b in the forward direction D,the same operations indicated in time t0 to time t5 in FIG. 8 arecarried out; accordingly, descriptions of these operations shall beomitted, and descriptions shall instead be given of the operations fromtime t5, immediately prior to the next moving object 11 rebounding andreturning at the passage position Q4.

In FIG. 12, the period from time t5 to time t6 is a period in which themoving object 11 is in the passage position Q4, or in other words, is infront of the second light-receiving element 4 b. Because the movingobject 11 rebounds and returns to the passage position Q4 after havingpassed in front of the first and second light-receiving elements 4 a and4 b in the forward direction D, the light pulse from the light-emittingelement 3 enters into only the second light-receiving element 4 b, anddoes not enter into the first light-receiving element 4 a. For thisreason, the binary signal PDA of the first comparator 33 stays atlow-level, and the binary signal PDB of the second comparator 37 goes tohigh-level. The first synchronizing detection circuit 34 holds theoutput signal SA at low-level. In addition, the second synchronizingdetection circuit 38 switches the output signal SB to high-level whenthe binary signal PDB of the second comparator 37 is high-level twotimes in a row. Because the output signal SA of the first synchronizingdetection circuit 34 stays at low-level, the output holding circuit 39holds the holding signal J at low-level. In addition, because theholding signal J is low-level, the output determination circuit 41 holdsthe output signal K at high-level. Also, when the output signal SB ofthe second synchronizing detection circuit 38 switches from low-level tohigh-level, the output signal SA of the first synchronizing detectioncircuit 34 is low-level; thus the output determination circuit 41determines that the moving object 11 has moved in the reverse direction,and switches the output signal L to low-level. At this time, because theoutput signal K is high-level and the output signal L is low-level, theoutput circuit 44 holds the output signal Vo at low-level.

In FIG. 12, the period from time t6 to time t7 is a period in which themoving object 11 is in the passage position Q5, or in other words, isimmediately after the first and second light-receiving elements 4 a and4 b. If the moving object 11 has once again moved in the forwarddirection D, the pulse light from the light-emitting element 3 does notenter into the first and second light-receiving elements 4 a and 4 b,and the binary signals PDA and PDB of the first and second comparators33 and 37 are low-level. The first synchronizing detection circuit 34holds the output signal SA at low-level. In addition, the secondsynchronizing detection circuit 38 switches the output signal SB tolow-level when the binary signal PDB of the second comparator 37 islow-level two times in a row. The output holding circuit 39 holds theholding signal J at low-level. In addition, because the holding signal Jis low-level, the output determination circuit 41 holds the outputsignal K at high-level. Also, when the output signal SB of the secondsynchronizing detection circuit 38 switches from high-level tolow-level, the output signal SA of the first synchronizing detectioncircuit 34 is low-level; thus the output determination circuit 41switches the output signal L from low-level to high-level. At this time,because the output signals K and L are both high-level, the outputcircuit 44 holds the output signal Vo at low-level.

In this manner, in the period from time t5 to time t7 shown in FIG. 12,after the moving object 11 passes in front of the first and secondlight-receiving elements 4 a and 4 b forward direction D, the movingobject 11 rebounds and returns to the passage position Q4, and then onceagain moves in the forward direction D; however, the output signal Vo isnot switched. Through this, even if the moving object 11 that hasalready passed through rebounds and returns, that moving object 11 isnot counted again, and thus errors do not arise in the counting of themoving object 11.

In FIG. 12, from time t7 on, the operations of the period from time t0to time t5 as shown in FIG. 8 are repeated as long as the moving object11 passes in front of the first and second light-receiving elements 4 aand 4 b in the forward direction D, and each time the moving object 11passes, the output signal Vo of the output circuit 44 becomeshigh-level.

Next, referring to the timing chart of FIG. 13, descriptions shall begiven regarding operations when ambient light or light resulting fromfraudulent behavior enters into the first and second light-receivingelements 4 a and 4 b simultaneously.

Note that in the same manner as FIG. 8, FIG. 13 shows the pulse-formsignal SP; the presence/absence of the moving object 11 in front of thefirst and second light-receiving elements 4 a and 4 b; the binarysignals PDA and PDB; the output signals SA, SB, K, L, and Vo.

In FIG. 13, in the period from time t1 on, when ambient light or lightresulting from fraudulent behavior enters into the first and secondlight-receiving elements 4 a and 4 b simultaneously, the binary signalsPDA and PDB of the first and second comparators 33 and 37 go tohigh-level. When the binary signals PDA and PDB of the first and secondcomparators 33 and 37 are high-level two times in a row, the first andsecond synchronizing detection circuits 34 and 38 switch theirrespective output signals SA and SB to high-level. When the outputsignal SA changes from high-level to low-level, the output signal SB ishigh-level; therefore, the output holding circuit 39 holds the holdingsignal J at low-level. In addition, because the holding signal J islow-level, the output determination circuit 41 holds the output signal Kat high-level. Also, when the output signal SB of the secondsynchronizing detection circuit 38 switches from high-level tolow-level, the output signal SA of the first synchronizing detectioncircuit 34 is low-level; thus the output determination circuit 41 putsthe output signal L at low-level for one pulse. Because the outputsignal K is held at high-level, the output circuit 44 holds the outputsignal Vo at low-level. Through this, the output signal Vo does not goto high-level even if ambient light or light resulting from fraudulentbehavior enters, and thus errors do not arise in the counting of themoving object 11.

In this manner, with the moving object detection photointerrupter 1 ofthe present embodiment, moving objects 11 are sequentially counted aslong as the moving objects 11 pass through in the forward direction D;even if an error such as a moving object 11 rebounding occurs, themoving objects 11 can be counted accurately regardless of the distanceof this rebound. Furthermore, erroneous operations due to ambient lightor light resulting from fraudulent behavior do not occur, and thusaccurate counting can be performed in a consistent manner.

FIG. 14 is a circuit diagram illustrating a detailed configuration ofthe output holding circuit 39, output determination circuit 41, andoutput circuit 44 of the moving object detection photointerrupter 1 ofFIG. 6. Hereinafter, descriptions shall be given regarding theoperations of these circuits with reference to the circuit diagram ofFIG. 14.

In FIG. 14, the circuits from 47 to 63 correspond to the outputdetermination circuit 41; the circuits from 47 to 53 correspond to theoutput holding circuit 39; and the circuit 64 corresponds to the outputcircuit 44.

A reset circuit 46 emits a reset signal when power to the moving objectdetection photointerrupter 1 is turned on. A clock generation circuit 45emits a clock pulse two times when the output signal SA of the firstsynchronizing detection circuit 34 changes from low-level to high-level(rising) or when the output signal SA changes from high-level tolow-level (falling).

Two-stage shift registers 47 and 48 hold the signal level of the outputsignal SB of the second synchronizing detection circuit 38 when theoutput signal SA of the first synchronizing detection circuit 34 changesfrom low-level to high-level (rising) or when the output signal SAchanges from high-level to low-level (falling). The output of a NOR 52corresponds to the holding signal J of the output holding circuit 39.

In D flip-flops 53 and 54, an XOR 55, and NANDs 56 and 57, when theoutput signal SB of the second synchronizing detection circuit 38changes from low-level to high-level, the output of the NAND 56 goes tolow-level, and when the output signal SB changes from high-level tolow-level, the output of the NAND 57 goes to low-level for one pulse.The output of a NAND 63 corresponds to the output signal K of the outputdetermination circuit 41, and the output of an AND 62 corresponds to theoutput signal L of the output determination circuit 41.

Next, descriptions shall be given regarding operations when a movingobject 11 passes through in the forward direction D, with reference tothe timing chart of FIG. 8.

First, a reset signal is outputted from the reset circuit 46. Thetwo-stage shift register 47 is inputted with the reset signal at PR, andputs all of outputs Q0 to Q2 to high-level. In addition, the two-stageshift register 48 is inputted with the reset signal at CLR, and puts allof outputs Q0 to Q2 to low-level.

During time t2 to time t3, when a moving object 11 passes in front ofthe first light-receiving element 4 a, the output signal SA of the firstsynchronizing detection circuit 34 changes from low-level to high-level.At this time, a clock pulse is generated and outputted two times by theclock generation circuit 45. The two-stage shift register 47 is inputtedwith the output signal SB of the second synchronizing detection circuit38 at an input IN. Because the moving object 11 is in front of only thefirst light-receiving element 4 a, the output signal SB of the secondsynchronizing detection circuit 38 is low-level. Accordingly, thetwo-stage shift register 47 sequentially sends out low-level outputsignals SB due to the two clock pulses, and puts all outputs Q0 to Q2 tolow-level. In addition, the two-stage shift register 48 is inputted withthe signal from the output Q2 of the two-stage shift register 47 in aninput IN, and because the output Q2 is at high-level due to the resetsignal, the two-stage shift register 48 sequentially sends outhigh-level signals due to the two clock pulses, and puts all outputs Q0to Q2 to high-level.

A NOR 49 is inputted with the outputs Q0 to Q2 of the two-stage shiftregister 47, and outputs high-level only when Q0 to Q2 are alllow-level. An AND 50 is inputted with the outputs Q0 to Q2 of thetwo-stage shift register 48, and outputs high-level only when Q0 to Q2are all high-level.

A NAND 51 is inputted with the outputs of the NOR 49 and the AND 50, andoutputs low-level only when these outputs are both high-level.

The NOR 52 is inputted with the output of the NAND 51 and an invertedoutput signal SA of the first synchronizing detection circuit 34, andoutputs high-level (the holding signal J) only when both of thesesignals are low-level.

In other words, in the circuits 47 to 52, high-level (the holding signalJ) is outputted by the NOR 52 only when the output signal SA of thefirst synchronizing detection circuit 34 changes from low-level tohigh-level, all the outputs Q0 to Q2 of the two-stage shift register 47,which is holding the signal level of the output signal SB of the secondsynchronizing detection circuit 38, are low-level, and all outputs Q0 toQ2 of the two-stage shift register 48 are high-level.

To explain in accordance with the movement of the moving object 11, whenthe moving object 11 starts to pass in the forward direction in front ofthe first light-receiving element 4 a, the moving object 11 is not infront of the second light-receiving element 4 b (all outputs Q0 to Q2 ofthe two-stage shift register 47 are low-level). High-level (the holdingsignal J) is outputted from the NOR 52 only when the moving object 11has finished passing in the forward direction in front of the firstlight-receiving element 4 a and is in front of the secondlight-receiving element 4 b (all outputs Q0 to Q2 of the two-stage shiftregister 48 are high-level).

When a moving object 11 passes in front of the second light-receivingelement 4 b, the output signal SB of the second synchronizing detectioncircuit 38 changes from low-level to high-level. The output signal SB isinputted into the D flip-flop 53 at D, and when the output signal SBchanges from low-level to high-level and the clock is inputted into theD flip-flop 53, an output Q of the D flip-flop 53 goes to high-level. Atthis time, an output Q of the D flip-flop 54 is low-level; the XOR 55 isinputted with the outputs Q, and outputs high-level for one clock pulse,only when the outputs Q differ from one another. In addition, the NAND56 is inputted with the output signal SB of the second synchronizingdetection circuit 38 and the output of the XOR 55, and outputs low-levelonly when both of these inputs are high-level. Accordingly, the NAND 56outputs low-level for one pulse, only when the output signal SB of thesecond synchronizing detection circuit 38 changes from low-level tohigh-level (rising).

The NAND 57 is inputted with an inverted output signal SB of the secondsynchronizing detection circuit 38 and the output of the XOR 55, andoutputs low-level only when both of these inputs are high-level. Inother words, the NAND 57 outputs low-level for one pulse, only when theoutput signal SB of the second synchronizing detection circuit 38changes from high-level to low-level (falling).

An OR 59 is inputted with the output signal SA of the firstsynchronizing detection circuit 34 and the output of the NAND 56, andthus outputs low-level for one pulse only when both of these inputs arelow-level, or in other words, when the output signal SA of the firstsynchronizing detection circuit 34 is low-level at the time when theoutput signal SB of the second synchronizing detection circuit 38 isrising (this occurs when the moving object 11 has begun passing in thereverse direction).

A NOR 58 is inputted with the output signal SA of the firstsynchronizing detection circuit 34 and the output of the NAND 57, andthus outputs high-level for one pulse only when both of these inputs arelow-level, or in other words, when the output signal SA of the firstsynchronizing detection circuit 34 is low-level at the time when theoutput signal SB of the second synchronizing detection circuit 38 isfalling (this occurs when the moving object 11 has finished passing inthe forward direction, or when lights due to ambient light or the likeenters simultaneously).

A NOR 60 is inputted with the output of the NOR 58 and a signal from thereset circuit 46, and outputs low-level when one of these is high-level.In other words, the NOR 60 outputs low-level for one pulse when reset bythe reset circuit 46 or when the moving object 11 has finished passingin the forward direction.

An RS flip-flop 61 is inputted with the output of the OR 59 as a setsignal at S, and is inputted with the output of the NOR 60 as a resetsignal at R. Therefore, after the output signal SA of the firstsynchronizing detection circuit 34 goes to low level at the point intime when the output signal SB of the second synchronizing detectioncircuit 38 is rising (when the moving object 11 has begun to pass in thereverse direction), and the set signal has gone to low-level for onepulse, the RS flip-flop 61 puts an output Q⁻ at low-level until thereset signal goes to low-level.

In addition, when the output signal SA of the first synchronizingdetection circuit 34 goes to low level at the point in time when theoutput signal SB of the second synchronizing detection circuit 38 isfalling (when the moving object 11 has finished passing in the forwarddirection), and reset signal goes to low-level for one pulse, the RSflip-flop 61 puts the output Q⁻ at high-level.

The AND 62 is inputted with the output Q⁻ of the RS flip-flop 61 and theoutput of the NOR 60, and outputs low-level (the output signal L) whenone of these is low-level. In other words, in the case where the movingobject 11 has begun passing in the reverse direction, the AND 62 outputslow-level until the moving object 11 has finished passing in the forwarddirection, or outputs low-level for one pulse in the case where themoving object 11 has finished passing in the forward direction.

The NAND 63 is inputted with the output of the NOR 52 (the holdingsignal J), an inverted output signal SB of the second synchronizingdetection circuit 38, and the output Q⁻ of the RS flip-flop 61, andoutputs low-level (the output signal K) only when these inputs are allhigh-level. In other words, the NAND 63 outputs low-level (the outputsignal K) when the previous moving object 11 has finished passing in theforward direction and the present moving object 11 has begun passing inthe forward direction.

An RS flip-flop 64 is inputted with the output of the NAND 63 (theoutput signal K) as a set signal at S, and is inputted with the outputof the AND 62 (the output signal L) as a reset signal at R. Therefore,the previous moving object 11 has finished passing in the forwarddirection, the present moving object 11 has begun passing in the forwarddirection, the output signal SB of the second synchronizing detectioncircuit 38 goes to low-level, the output of the NAND 63 (the outputsignal K) goes to low-level, and the set signal of the RS flip-flop 64goes to low-level; at this time, the output Q of the RS flip-flop 64(the output signal Vo) goes to high-level.

Then, when the output signal SB of the second synchronizing detectioncircuit 38 goes to high-level, the output of the NAND 63 (the outputsignal K) goes to high-level, and the set signal to the RS flip-flop 64goes to high-level. Furthermore, when the moving object 11 has finishedmoving in the forward direction, the AND 62 outputs low-level (theoutput signal L) for one pulse, the reset signal to the RS flip-flop 64goes to low-level, and the output Q of the RS flip-flop 64 (the outputsignal Vo) goes to low-level.

Next, descriptions shall be given regarding operations when a movingobject 11 rebounds after the time t5 and then passes in front of thefirst and second light-receiving elements 4 a and 4 b in the reversedirection, with reference to the timing chart of FIG. 9.

In the case where the moving object 11 moves in the reverse direction,first, the moving object 11 begins passing in front of the secondlight-receiving element 4 b. When the output signal SB of the secondsynchronizing detection circuit 38 changes from low-level to high-level,the output signal SA of the first synchronizing detection circuit 34 islow-level, and thus the OR 59 outputs low-level for one pulse, and theoutput Q⁻ of the RS flip-flop 61 goes to low-level. Therefore, theoutput of the AND 62 (the output signal L) goes to low-level for onepulse, and because the reset signal of the RS flip-flop 64 goes tolow-level, the output Q of the RS flip-flop 64 (the output signal Vo)stays at low-level.

Additionally, when the moving object 11 passes in front of the secondlight-receiving element 4 b and begins passing in front of the firstlight-receiving element 4 a, two clock pulses are generated andoutputted by the clock generation circuit 45, and the signals aresequentially sent to the two-stage shift registers 47 and 48. At thistime, the two-stage shift register 47 is inputted with the output signalSB of the second synchronizing detection circuit 38 at an input IN, andtherefore all outputs Q0 to Q2 of the two-stage shift register 47 go tohigh-level. Additionally, all outputs Q0 to Q2 of the two-stage shiftregister 48 also go to high-level. Therefore, the output of the NOR 49goes to low-level, and the output of the AND 50 goes to high-level; forthis reason, the output of the NAND 51 goes to high-level, and theoutput of the NOR 52 goes to low-level. Accordingly, because the outputof the NAND 63 (the output signal K) goes to high-level, the set signalof the RS flip-flop 64 goes to high-level, the RS flip-flop 64 is notset, and thus the output Q (the output signal Vo) is not switched tohigh-level, and stays at low-level.

The output of the AND 62 (the output signal L) is held at low-leveluntil the moving object 11 finishes passing in the forward direction.For this reason, the RS flip-flop 64 continues to be reset until themoving object 11 finishes passing in the forward direction. In otherwords, the RS flip-flop 64 continues to be reset until the moving object11 has finished passing in the forward direction after having passed inthe reverse direction, and the RS flip-flop 64 stops being reset afterthe moving object 11 has finished passing in the forward direction. Forthis reason, the output Q of the RS flip-flop 64 (the output signal Vo)is switched to high-level when the next moving object 11 passes in theforward direction.

Next, descriptions shall be given regarding operations when a movingobject 11 rebounds at the passage position Q3 after the time t5 and thenonce again passes in the forward direction D, with reference to thetiming chart of FIG. 10.

When the moving object 11 passes in front of the first light-receivingelement 4 a, the output signal SA of the first synchronizing detectioncircuit 34 changes from low-level to high-level. At this time, in thecircuits 47 to 52, high-level (the holding signal J) is outputted by theNOR 52 because the output signal SA of the first synchronizing detectioncircuit 34 changes from low-level to high-level, all the outputs Q0 toQ2 of the two-stage shift register 47, which is holding the signal levelof the output signal SB of the second synchronizing detection circuit38, are low-level, and all outputs Q0 to Q2 of the two-stage shiftregister 48 are high-level.

To explain in accordance with the movement of the moving object 11, whenthe moving object 11 starts to pass in the forward direction in front ofthe first light-receiving element 4 a, the moving object 11 is not infront of the second light-receiving element 4 b (all outputs Q0 to Q2 ofthe two-stage shift register 47 are low-level). High-level (the holdingsignal J) is outputted from the NOR 52 only when the moving object 11has finished passing in the forward direction in front of the firstlight-receiving element 4 a and is in front of the secondlight-receiving element 4 b (all outputs Q0 to Q2 of the two-stage shiftregister 48 are high-level).

When the moving object 11 is in front of the second light-receivingelement 4 b, the output signal SB of the second synchronizing detectioncircuit 38 changes from low-level to high-level. At this time, the OR 59outputs high-level, and thus the RS flip-flop 61 is not set, and theoutput Q⁻ of the RS flip-flop 61 is high-level. Because the output ofthe NOR 52 is high-level, the NAND 63 outputs low-level (the outputsignal K) until the output signal SB of the second synchronizingdetection circuit 38 goes to high-level. Accordingly, the RS flip-flop64 is set, and the output Q of the RS flip-flop 64 (the output signalVo) is switched to high-level.

Next, when the moving object 11 rebounds and returns from the secondlight-receiving element 4 b, the output signal SB of the secondsynchronizing detection circuit 38 changes from high-level to low-level.When the output signal SB of the second synchronizing detection circuit38 switches from high-level to low-level, the output signal SA of thefirst synchronizing detection circuit 34 is high-level; therefore, theNOR 58 outputs low-level. Because of this, the output of the NOR 60 goesto high-level and the output of the AND 62 (the output signal L) goes tohigh-level, and thus the RS flip-flop 64 is not reset, and the output Qof the RS flip-flop 64 (the output signal Vo) goes to high-level.

In the period from time t8 to time t9, when the output signal SA of thefirst synchronizing detection circuit 34 switches from high-level tolow-level, all outputs Q0 to Q2 of the two-stage shift register 47 go tolow-level, and all outputs Q0 to Q2 of the two-stage shift register 48go to low-level; thus the output of the NOR 52 is held at low-level.Accordingly, the output Q of the RS flip-flop 64 (the output signal Vo)undergoes no change and is held at high-level.

In the period from time t9 to time t10, the output signals SA and SB ofthe first and second synchronizing detection circuits 34 and 38 undergono change, and thus the other output signals also undergo no change.

In the period from time t10 to time t11, when the output signal SA ofthe first synchronizing detection circuit 34 switches from high-level tolow-level, the output signal SB of the second synchronizing detectioncircuit 38 is low-level; therefore, all outputs Q0 to Q2 of thetwo-stage shift register 47 go to low-level, all outputs Q0 to Q2 of thetwo-stage shift register 48 also go to low-level, and thus the output ofthe NOR 52 is low-level and the RS flip-flop 64 in not set.

When the output signal SB of the second synchronizing detection circuit38 switches from low-level to high-level, the output signal SA of thefirst synchronizing detection circuit 34 is high-level; therefore, theoutput of the OR 59 goes to high-level, the RS flip-flop 61 is not set,and the output Q⁻ of the RS flip-flop 61 is held at high-level.Accordingly, the RS flip-flop 64 is not reset, and the output Q of theRS flip-flop 64 (the output signal Vo) is held at high-level.

In the period from time t11 to time t12, the output signals SA and SB ofthe first and second synchronizing detection circuits 34 and 38 undergono change, and thus the other output signals also undergo no change.

In the period from time t12 to time t13, when the output signal SA ofthe first synchronizing detection circuit 34 switches from high-level tolow-level, the output signal SB of the second synchronizing detectioncircuit 38 is high-level; therefore, all outputs Q0 to Q2 of thetwo-stage shift register 47 go to high-level, all outputs Q0 to Q2 ofthe two-stage shift register 48 go to low-level, the output of the NOR52 goes to low-level, the output of the NAND 63 (the output signal K) isheld at high-level, and the RS flip-flop 64 is not set.

When the output signal SB of the second synchronizing detection circuit38 switches from high-level to low-level, the output signal SA of thefirst synchronizing detection circuit 34 is low-level; therefore, theNOR 58 outputs high-level for one pulse, and the output of the NOR 60goes to low-level. Therefore, the output of the AND 62 (the outputsignal L) goes to low-level for one pulse, the RS flip-flop 64 is set,and the output Q (the output signal Vo) switches from high-level tolow-level.

From time t13 on, the output signal Vo goes to high-level each time amoving object 11 moves in the forward direction D, in the same manner aswith time t0 to t5.

Next, descriptions shall be given regarding operations when a movingobject 11 rebounds at the passage position Q2 after the time t5 and thenonce again passes in the forward direction D, with reference to thetiming chart of FIG. 11.

When a moving object 11 reaches in front of the first light-receivingelement 4 a, the output signal SA of the first synchronizing detectioncircuit 34 changes from low-level to high-level. At this time, in thecircuits 47 to 52, high-level is outputted by the NOR 52 because theoutput signal SA of the first synchronizing detection circuit 34 changesfrom low-level to high-level, all the outputs Q0 to Q2 of the two-stageshift register 47, which is holding the signal level of the outputsignal SB of the second synchronizing detection circuit 38, arelow-level, and all outputs Q0 to Q2 of the two-stage shift register 48are high-level. Accordingly, until the output signal SB of the secondsynchronizing detection circuit 38 goes to high-level, the NAND 63outputs low-level (the output signal K), the RS flip-flop 64 is reset,and the output Q of the RS flip-flop 64 (the output signal Vo) goes tohigh-level.

In the period from time t6 to time t7, because the output signal SB ofthe second synchronizing detection circuit 38 undergoes no change, theoutput of the AND 62 (the output signal L) is held at high-level, andthe output Q of the RS flip-flop 64 (the output signal Vo) is held athigh-level.

In the period from time t7 to time t8, the output signals of the firstand second synchronizing detection circuits undergo no change, and thusthe other output signals also undergo no change.

In the period from time t8 to time t9, when the output signal SA of thefirst synchronizing detection circuit 34 changes from low-level tohigh-level, the output signal SB of the second synchronizing detectioncircuit 38 is low-level; therefore, all outputs Q0 to Q2 of thetwo-stage shift register 47 go to low-level, all outputs Q0 to Q2 of thetwo-stage shift register 48 go to low-level, and thus the output of theNOR 52 is low-level and the RS flip-flop 64 in not set.

In addition, when the output signal SB of the second synchronizingdetection circuit 38 switches from low-level to high-level, the outputsignal SA of the first synchronizing detection circuit 34 is high-level;therefore, the output of the OR 59 goes to high-level, the RS flip-flop61 is not set, and the output Q⁻ of the RS flip-flop 61 is held athigh-level. Accordingly, the RS flip-flop 64 is not reset, and theoutput Q of the RS flip-flop 64 (the output signal Vo) is held athigh-level.

In the period from time t9 to time t10, the output signals SA and SB ofthe first and second synchronizing detection circuits 34 and 38 undergono change, and thus the other signals also undergo no change.

In the period from time t10 to time t11, when the output signal SA ofthe first synchronizing detection circuit 34 switches from high-level tolow-level, the output signal SB of the second synchronizing detectioncircuit 38 is high-level; therefore, all outputs Q0 to Q2 of thetwo-stage shift register 47 go to high-level, all outputs Q0 to Q2 ofthe two-stage shift register 48 go to low-level, the output of the NOR52 goes to low-level, the output of the NAND 63 (the output signal K) isheld at high-level, and the RS flip-flop 64 is not set.

Then, when the output signal SB of the second synchronizing detectioncircuit 38 switches from high-level to low-level, the output signal SAof the first synchronizing detection circuit 34 is low-level; therefore,the NOR 58 outputs high-level for one pulse, and the output of the NOR60 goes to low-level. Therefore, the output of the AND 62 (the outputsignal L) also goes to low-level for one pulse, the RS flip-flop 64 isreset, and the output Q of the RS flip-flop 64 (the output signal Vo) isswitched from high-level to low-level.

From time t11 on, the output signal Vo goes to high-level each time amoving object 11 moves in the forward direction D, in the same manner aswith time t0 to t5.

Next, descriptions shall be given regarding operations when a movingobject 11 rebounds at the passage position Q4 after the time t5 and thenonce again passes in the forward direction D, with reference to thetiming chart of FIG. 12.

In the period from time t5 to time t6, the moving object 11 does notpass in front of the first light-receiving element 4 a, and thus theoutput signal SA of the first synchronizing detection circuit 34undergoes no change. For this reason, NOR 52 is held at low-level.Accordingly, the output of the NAND 63 (the output signal K) is held athigh-level, the RS flip-flop 64 is not set, and the output Q of the RSflip-flop 64 (the output signal Vo) is held at low-level.

When the output signal SB of the second synchronizing detection circuit38 switches from low-level to high-level, the output signal SA of thefirst synchronizing detection circuit 34 is low-level; thus the movingobject 11 can be considered to have begin passing in the reversedirection. At this time, the output of the OR 59 goes to low-level, theRS flip-flop 61 is set, and the output Q⁻ of the RS flip-flop 61 goes tolow-level. Therefore, the output of the AND 62 (the output signal L)goes to low-level, the RS flip-flop 64 is reset, and the output Q of theRS flip-flop 64 (the output signal Vo) is held at low-level.

In the period from time t6 to time t7, when the output signal SB of thesecond synchronizing detection circuit 38 switches from high-level tolow-level, the output signal SA of the first synchronizing detectioncircuit 34 is low-level; therefore, the moving object 11 can beconsidered to have finished passing in the forward direction, and theoutput of the NOR 60 goes to low-level, the RS flip-flop 61 is reset,and the output Q⁻ of the RS flip-flop 61 goes to high-level. Therefore,the output of the AND 62 (the output signal L) goes to high-level, theRS flip-flop 64 is set, and the output Q of the RS flip-flop 64 (theoutput signal Vo) is held at low-level.

From time t7 on, the output signal Vo goes to high-level each time amoving object 11 moves in the forward direction D, in the same manner aswith time t0 to t5.

Next, referring to the timing chart of FIG. 13, descriptions shall begiven regarding operations when ambient light or light resulting fromfraudulent behavior enters into the first and second light-receivingelements 4 a and 4 b simultaneously.

When the output signal SA of the first synchronizing detection circuit34 switches from low-level to high-level, the output signal SB of thesecond synchronizing detection circuit 38 is high-level; therefore, alloutputs Q0 to Q2 of the two-stage shift register 47 go to high-level,all outputs Q0 to Q2 of the two-stage shift register 48 go tohigh-level, the output of the NOR 52 is held at low-level, the output ofthe NAND 63 (the output signal K) is held at high-level, the RSflip-flop 64 is not set, and the output Q of the RS flip-flop 64 (theoutput signal Vo) is held at low-level.

In addition, when the output signal SB of the second synchronizingdetection circuit 38 switches from low-level to high-level, the outputsignal SA of the first synchronizing detection circuit 34 is low-level;therefore, the output of the OR 59 goes to low-level. Therefore, theoutput Q⁻ of the RS flip-flop 61 goes to high-level, the output of theAND 62 (the output signal L) goes to high-level, the RS flip-flop 64 isnot reset, and the output Q of the RS flip-flop 64 (the output signalVo) is held at low-level.

In this manner, the RS flip-flop 64 is not set, and thus the output Q(the output signal Vo) is held at low-level, in the case where lightsenter simultaneously.

It should be noted that the present invention is not limited to theaforementioned embodiment, and many variations can be made thereon. Forexample, various types of elements can be applied as the light-emittingelements and the light-receiving elements. Furthermore, a singlelight-emitting element and a single light-receiving element may make upa single set, with the light emitted from the light-emitting elementbeing received by the light-receiving element, and plural sets oflight-emitting elements and light-receiving element may be disposed atintervals in the passing direction of the moving object.

Furthermore, the present invention can be applied not only in areflective type photointerrupter, such as the moving object detectionphotointerrupter 1, but can also be applied in a transmissive typephotointerrupter. In the case of a transmissive type photointerrupter,when a moving object is in front of a light-receiving element, lightdoes not enter into that light-receiving element, and when a movingobject is not in front of a light-receiving element, light enters intothat light-receiving element; thus, compared to a reflective typephotointerrupter, the high-level and low-level of the detection outputof the light-receiving elements are inverted.

In addition, the scope of the present invention includes not only amoving object detection photointerrupter but also an electric device inwhich the moving object detection photointerrupter is applied. Officeautomation machines such as copying machines, factory automationmachines, general household appliances, and the like can given asexamples of such an electronic device.

Note that the present invention may be embodied in other forms withoutdeparting from the spirit or essential characteristics thereof.Accordingly, the embodiments disclosed in this application are to beconsidered in all respects as illustrative and not limiting. The scopeof the invention is indicated by the appended claims rather than by theforegoing description. Furthermore, all changes which come within themeaning and range of equivalency of the claims are intended to beembraced therein.

1. A moving object detection photointerrupter that sequentially detectsthe passing of a plurality of moving objects, the photointerruptercomprising: at least one light-emitting portion that emits light; aplurality of light-receiving portions, disposed at intervals in thepassing direction of the moving object, that receive and detect lightemitted from the light-emitting portion and reflected by the movingobject; a holding portion that holds information indicating the passingdirection of the moving object corresponding to a change in thedetection outputs of the light-receiving portions occurring when thelight-receiving portions receive the light reflected by the movingobject; and a determination portion that determines the passing of themoving object based on the passing direction of the moving object asheld by the holding portion and the detection outputs of thelight-receiving portions occurring when the light-receiving portionsreceive the light reflected by the next moving object.
 2. The movingobject detection photointerrupter according to claim 1, wherein when thepassing direction of the moving object as held by the holding portion isthe forward direction, and the passing direction of the next movingobject corresponding to the detection outputs of the light-receivingportions is the forward direction, the determination portion determinesthat the next moving object has passed.
 3. The moving object detectionphotointerrupter according to claim 1, wherein when the passingdirection of the moving object as held by the holding portion is thereverse direction, the determination portion determines that the movingobject has not passed.
 4. The moving object detection photointerrupteraccording to claim 1, wherein when the passing direction of the movingobject as held by the holding portion is the reverse direction, thedetermination portion determines that the next moving object has notpassed, even if the passing direction of the next moving objectcorresponding to a change in the detection outputs of thelight-receiving portions is the forward direction.
 5. The moving objectdetection photointerrupter according to claim 1, wherein when the movingobject has been detected by the light-receiving portion on the exit sideof the forward direction and has not been detected by thelight-receiving portion on the entry side, the determination portiondetermines that the moving object has not passed, and outputs an errorsignal or holds the signal indicating the determination.
 6. The movingobject detection photointerrupter according to claim 1, wherein when themoving object has been detected by the light-receiving portion on theentry side of the forward direction and has not been detected by thelight-receiving portion on the exit side, the holding portion holds theforward direction as the passing direction of the moving object, andwhen the passing direction of the moving object as held by the holdingportion is the forward direction, and the passing direction of the nextmoving object corresponding to a change in the detection outputs of thelight-receiving portions is the forward direction, the determinationportion determines that the next moving object has passed.
 7. The movingobject detection photointerrupter according to claim 1, wherein when theoutputs of the light reception performed by the light-receiving portionschange simultaneously, the determination portion outputs an error signalor holds the signal indicating the determination.
 8. The moving objectdetection photointerrupter according to claim 7, wherein afteroutputting an error signal or holding the signal indicating thedetermination, the determination portion stops the output of the errorsignal when the passing direction of the moving object corresponding toa change in the detection outputs of the light-receiving portionsbecomes the forward direction.
 9. The moving object detectionphotointerrupter according to claim 1, further comprising: asynchronization detection portion that validates the detection outputsof the light-receiving portions when the light emission timing of thelight-emitting portion and the light receiving timing of thelight-receiving portions match plural times in a row.
 10. The movingobject detection photointerrupter according to claim 9, wherein thesynchronization detection portion invalidates the detection outputs ofthe light-receiving portions when the light emission timing of thelight-emitting portion and the light receiving timing of thelight-receiving portions do not match.
 11. The moving object detectionphotointerrupter according to claim 1, wherein there is only onelight-emitting portion, and the light-receiving portions receive thelight from the light-emitting portion together.
 12. An electric deviceusing the moving object detection photointerrupter according to claim 1.